Friday, December 31, 2010

Hstalavista 2010

This is the last post of the year and since it's been another good year full of fun, I would like to finish it on a humorous note.

The following four caricatures are from Shooty, a Slovak political satirist and artist, they were shown in an open air exposition. Funnily enough the event was sponsored by the US consulate.


Anbody following the financial news in Europe, know what this stands for, I found it hillarious.


Good luck Mr. Obama :-)


Cultural norms changed big time!


Industrialised death...

On this note, all the best wishes for new year!

Monday, November 22, 2010

2011 - Obama's 3rd year in Office

I've came across several articles recently about the variation in US Presidential Politics ahead of re-election. The argument is simple; potentially unpopular policies and laws are passed at the beginning of a presiding government term as opposed to more popular laws towards the end of term so that the presiding government will stand better chances of re-election. This simple argument is based on the bias of recent memories, in other words, people tend to remember recent past better than what happened several years ago.

Below is a table summarising the S&P 500 annual changes in %: 1962-2010 (13 election terms):



Of course the amount of data we can rely on is statistically seen, tiny. Yet it provides some indication to a more positive performance, in the second half of the US Presidential term. Especially the 3rd year of a term, has historically seen much growth.

Monday, November 15, 2010

Witty Quotes - part 3

I certainly believe and associate to ideas expressed by some talented people, and I feel that sometimes a whole book gives you less than a dozen great quotes that hit the right spot :-)! So over the month I spontaneously put together a few quotes which I've come accross, and so here they are:

There is one thing stronger than all the armies of the world; an idea whose time has come. Victor Hugo

Everybody wants to right the world. Nobody wants to help their neighbour. Henry Miller

The ultimate measure of a person is not where they stand in moments of comfort and convenience, but where they stand at times of challenge and controversy. Martin Luther King

Act as if what you do makes a difference. It does! William James

No one knows what he can do till he tries. Publius Syrus

How wonderful it is that nobody need wait a single moment before starting to improve the world. Anne Frank

Action is the antidote to despair. Joan Baez

Beware of half-truths. You may have got hold of the wrong half! Unknown (Anonymous)

One understands people through the heart, not the eyes or the intellect. Mark Twain

Victory belongs to the most persevering! Napoleon Bonaparte

If you must tell me your opinions, tell me what you believe in. I have plenty of doubt of my own. Wolfgang Goethe

God created the world out of nothing, and as long as we are nothing, he can make something out of us. Martin Luther

A smooth sea never made a skilful mariner. Unknown (Anonymous)

Some people see things as they are and say, 'Why?' I dream things that never were and say, 'Why not?' George Shaw

The journey of a thousand miles begins with a single step. Chineese proverb

Learn to obey before you command! Greek proverb

Opportunity is missed by most people because it is dressed in overalls and looks like work. Thomas Edison

The further backward you can look, the further forward you are likely to see. Winston Churchill

I quote others only the better to express myself. Michel de Montaigne

Monday, October 4, 2010

Social Media Monitoring

WARNING: This article is critical of the Loughborough University Enterprise Office (an initiative to help commercials ideas & work from academia into viable business oportunities).

Well over a year ago (back in 2009, actually the idea came in 2008) I entertained myself with the idea of starting up a social media monitoring business. I have worked on the topic within my PhD and I have published on the topic and also did some decent work with a student of mine back through 2008/2009 academic year. Our results were great, winning me an IEEE best PhD student paper award at a conference among some encouraging feedback from my paper reviewers.

The idea was to use my student's existing server infrastructure (he runs a web hosting service in Poland) to accumulate web 2.0 datasets and apply data-mining and statistical techniques summarisation, and finally to build a nice and fancy User Interface based on edgy web-design techniques (which I lectured about to my large Introduction to Web Programming undergraduate class last year) and further wrap it all up into ontologies to be usable by semantic web capable agents!

The above sounded like a decent Business Plan to me, with relatively low risk, as I could have done this part time (aligned with the PhD) and we could have just used, as mentioned, my students server infrastructure to a degree. See this article for a very timely overview of Social Media Monitoring tools, and how significant they have become in business (There is much more academic work, looking at many case studies - drop me a line if you want some references to those).

We therefore decided to seek some initial funding or at least support from Loughborough's student enterprise office, in one form or another and depending on their response we wanted to begin development of the initial prototypes! After a few email exchanges and several phone conversations, I was very dissapointed...

The ent. office consultant was obviously overworked, and complained about her high volume of meetings, business trips and other responsibilities. Once I mentioned that we have published and received an award, her reaction shocked me. Apparently since the work was published we could not patent it, and hence without any possibilities of patenting she lost any interest. I was shocked by this reaction, assuming that patents still rule the world of software is something I consider quite ridiculous (just like the once click amazon buy button patent), in my opinion a barrier to innovation that's what my whole experience dealing with the entr. office at loughborough felt like.

It is ironic that reading the BBC article today, I realise that with a little bit support we could have had a finished beta product by today, covering local demand in social media monitoring in the Midlands area. Great way to throw logs under the feet of young university talent, Loughborough Student Enterprise Office, well done ;-)!

Any comments are welcome, at same time, I do know the Office was behind a few interesting projects, however they have a lot of improvement ahead to become worthy for a university of Loughboroughs Profile!

Friday, September 24, 2010

iReporter on CNN

Since web 2.0 largely concerns itself with easy data sharing, naturally it has already found many interesting applications within Journalism. One such example is CNN iReport, a web 2.0 system allowing any user to submit and edit news stories within a community of “citizen reporters”. Essentially any news can be uploaded since the contributions are neither edited, nor fact-checked, or screened, a-priori. Certain (urgent or timely) stories do get vetted and cleared by CNN, and these would be subsequently used by CNN in its mainstream broadcasting.

iReport is defined by a distinctive news-friendly community, which seems to find pleasure in reporting news. The community of contributors consists of around 20'000 enthusiasts who get ranked based on their site activity and value of contributions. Clearly the chance of an iReport item being selected by CNN for broadcast acts as a strong motivation itself (31'800 out of 485'000 reports were vetted by CNN, to date). See http://ireport.cnn.com/ and http://ireport.cnn.com/faq.jspa for more information.

Wednesday, September 1, 2010

Witty Quotes - part 2

This is the second installement, in my little series on witty and clever insights. These were mainly chosen from a book published by Ebury Press ("Keep calm and carry on"). I picked them on the basis of being representative of my beliefs and convictions I often live by or try to live by.

We make a living by what we get, but we make a life by what we give. Winston Churchill

A life spent making mistakes is not only more honorable but more useful than a life spent doing nothing. George Shaw

Upgrading one's imagination about what is possible is always a leap of faith. Clay Shirky

A greatest mistake a man can ever make is to be afraid of making one. Elbert Hubbard

The best portion of a good man's life - his little, nameless, unremembered acts of kindness. William Wordsworth

The foolish man seeks happiness in the distance the wise man grows it underneath his feet. James Oppenheim

Now and then it's good to pause in our pursuit of happiness and just be happy. Guillaume Apollinaire

A vigorous five-mile walk will do more good for an unhappy but otherwise healthy adult than all the medicine and psychology in the world. Paul White

You can make more friends in two months by becoming interested in other people than you can in two years by trying to get people interested in you. Dale Carnegie

Don't judge each day by the harvest you reap, but by the seeds that you plant. Robert Stevenson

If you can't sleep, get up and do something instead of lying there and worrying. It's the worry that gets you, not the loss of sleep. Dale Carnegie

Always laugh when you can. It is cheap medicine. Lord Byron

He who has a why to live can bear almost any how. Friedrich Nietzsche

The art of living lies less in eliminating our troubles, than growing with them. Bernard Baruch

While there is a chance of the world getting through its troubles, I hold that a reasonable man has to behave as though he were sure of it. If at the end your cheerfulness is not justified, at any rate you will have been cheerful. Herbert Wells

Prosperity is not without many fears and distastes, and adversity is not without comforts and hopes. Francis Bacon

Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. Mark Twain

Never doubt that a small group of thoughtful & committed people could change the world. Indeed, it's the only thing that ever hasMargaret Mead

Monday, August 9, 2010

Some witty quotes

I decided to run a little series on witty and clever quotes, I prefer to call them insights, since that more closely reflects the collection of quotes presented here. These insights were mainly chosen from a book published by Ebury Press ("Keep calm and carry on"). I picked them on the basis of being representative of my beliefs and convictions I often live by or try to live by. Here they are, in 2 parts - part 1 of 2.

I am an optimist it doesn't seem to much use to be anything else. Winston Churchill

Worry often gives a small thing a big shadow. Swedish Proverb

The only function of economic forecasting is to make astrology look respectable. John Galbraith

Beware of little expenses; a small leak will sink a great ship. Benjamin Franklin

A Bank is a place that will lend you money if you can prove that you don't need it. Bob Hope

Always be kind, for everyone is fighting a hard battle. Plato

Happiness depends upon ourselves. Aristotle

We will never return to the old boom and bust. Gordon Brown (2007 Budget Stat.)

The safe way to double your money is to fold it over once and put it in your pocket. Frank Hubbard

What we anticipate seldom occurs; what we least expect generally happens. Benjamin Disraeli

An economist is an expert who will know tomorrow why the things he predicted yesterday didn't happen today. Laurence Peter

Better bread with water than cake with trouble! Russian Proverb

For a greedy man even his tomb is too small. Tajikistani Proverb

It is unfortunate we can't buy many business executives for what they are worth and sell them for what they think they are worth. Malcolm Forbes

Beware the barrenness of a busy life. Socrates

Saturday, July 31, 2010

The Dot-com boom is over

The year 2000 was the infamous end of the dot-com internet boom; the 10th March to be precise! The period preceding this event saw heavy prefix investing (basically any company with an e- prefixed or .com appended to it was bought up straight away). This occurred because the expectation of promise from the internet and the future potential seemed enormous with the reach and potential of world wide web. However the technology and economical momentum simply was not there and thats why most companies failed.

The consolidation and second wave in what can be termed to be the second internet boom is the web 2.0 craze that is occurring at the moment: twitter, facebook, blogger, youtube, google, yahoo, ... The difference this time is that the technology has reached the tipping point. Economically online advertising now accounts for over $20 Billion worth in industry. A whole set of industry has grown around building and managing the huge datasets and data processing requirements of web 2.0 - this in turn is now supported by real profits of .com companies - and this is where the major difference to the previous boom. The simples business model - online advertising - actually works, online shopping works and finally some very cool new business models such as localised group buying emerged. Reasons: other than the technological advances and standardisation, the consumer trust issue has completely changed.

In my next posts, I intend to discuss web 2.0 criticisms and what they mean. I also intend to write several blog posts about the wayback machine! Any comments, please email or comment, thanks.

Saturday, June 19, 2010

Prediction API & Big Data API

Google has branched out in many directions since their initial search-engine & adwords success. The company has had such healthy profits (mainly from their internet based advertising) that they were able to dab in pretty much every current interesting application in Computer Science - see here!

For a while they are providing cloud computing services, such as Google Storage for Developers, check out the pricing of that service here. Google maintains all the data within their own infrastructure. I think this article tries to explains how the distributed storage is implemented (of course just a very generic overview). You will notice that the service is naturally scalable and pretty smart in a number of ways.

The most recent activity of google resulted in the announcement of two new APIs (Prediction API and BigData API). The diagram below shows how these fit together.



BigData is used to query a large cloud store (using an SQL dialect over a webservice) and the Prediction API can be used on the data to train google implemented AI models for prediction. This simply seems to be a machine learning library that can be accessed over a webservice. Obviously this runs on google cloud infrastructure and that has it's advantages.

A number of Machine Learning libraries exist, such as WEKA, RapidMiner and many other. I used to write some of my own code for these algorithms, however over the last few years I noticed an amazing increase in the count of ML libraries. In most of my work these days I use open source libraries.

I am not quite sure how the pricing of these APIs works (maybe somebody can enlighten us on this issue), my impression is it is connected to the Google cloud store service, for which these APIs will present another reason to use this store.

You can check out some code samples for the API here.

Thursday, June 17, 2010

Open Source Licenses

The best place to visit for more information on licenses would be the Open Source Initiative (OSI) at www.opensource.org/docs/definition.php The last time I checked, OSI has certified about 50 different licenses as being conformant with its concept of open source. So there's plenty of choice, but I will mention 3 most popular ones to you here. In any case it probably makes sense to research these a little more on your own since you have the best idea of how strict a licence you are after.

1- GNU General Public License (GPL)
The most known os license, (find the authoritative version at www.gnu.org/copyleft/gpl.html)
It is probably one of the strongest (and notorious) os licenses, it has a section 2b in the license that makes GPL a viral license. That means that if anyone likes your code and uses that code, they have to make their entire software GPL licensed too. The GPL restricts the people that receive your code but not you. In fact you can change the licence for specific people or versions to a more commercial license at any time. However people that already downloaded/agreed to your GPL licensed code version can distribute it under the GPL as long as they like.

2- BSD License, a Berkeley license (www.freebsd.org) used in first edition of Unix, you probably know that already :-). Not as strict to code users as GPL is, for example microsoft is known to have used parts of UNixes networking code in its commercial version of windows.

3-Mozzila Public License (MPL) (www.mozilla.org/MPL) more complex and more loaded with legalese than the GPL, yet it is largerly compatible with GPL. There's one major difference thought. The GPL forbids combining GPL code with proprietary code in a larger piece of work, whereas the MPL expressly allows this. My understanding is that MPL somewhat occupies the middle ground between GPL and BSD licenses.

Funny thing is actually, Microsoft doesn't like open source software :-), they critisize various aspects about os, and therefore they came-up with their own initiative which they called Shared-Source Licenses (see http://www.microsoft.com/resources/sharedsource/default.mspx for more info)

Finally, I'd love to hear various experiences with open source licensing you might have had. You can either comment or email me directly (note: your comment will first go for approval - apologies, but this is necessary due to spam).

Wednesday, May 5, 2010

Goldman Sachs Joke!

If more businesses operated like goldman-sachs...



A good book that looks at what happens behind the curtains in some Derivatives departments is provided in F.I.A.S.C.O by Frank Partnoy. Maybe a little out of date, the book is an interesting and entertaining read, I definitely recommend to read! Especially read it, if you are interested to find out whether any of the bad-practices accusations brought against GoldmanSachs are feasible. I leave it to you to make up your mind, nothing is black & white!

Thursday, April 29, 2010

Loughboroughs' Success at PiP Challenge

Yesterday 28th April 2010, the Loughborough University Team competed in the Morgan Stanley Investment Challenge Portfolio in Peril 2010, and first of all I want to thank all my team members for a great fun day at Morgan Stanley. I think we can be proud of how well we represented Loughborough University, especially given the talented teams of the likes of LSE, Imperial, UCL, Warwick, Manchester and also Cambridge, Oxford (amongst a total of 12, 8 member teams). All team members were rigorously selected from many candidates to represent universities, and the competition was tough.

our team




The PiP challenge definitely beat my expectations, in a very positive sense! The organisation was top and the way competition was run was also pretty cool and clever, with drinks and refreshments provided thorough.

Ready to start


It all started by a very nice introductory presentation by Asset Allocation Vice-President at Morgan Stanley. He gave a little talk about Asset Allocation, the tradition behind the PiP challenge, and re-iterated some of the rules. The basic idea was for a mutual fund of fictive $100'000'000 lead by our Loughborough team to be managed as an investment, with wise and sound macroeconomic investment asset allocation decisions based on simulated world news, and fundamental indicators on a simulated half-a-year basis. At each decision point, our 8 member team would discuss all new developments and allocate respective assets.

The pervasively interesting element about the game was a strong fictional storyline developed by macroeconomic experts at Morgan Stanley. The game started off with US and Europe experiencing low GDP growth and a growing competition against ASIAN economies, as ASIA was becoming a more self-sustained geographical region with increased trade and a newly established Asian Development Bank. The world started changing within the '4 simulated years' from then. Over the simulated period we saw, high inflation periods, instability in the Middle east, oil prices on the rise and fall, a small US house market bubble, accession of Turkey into the European Union, several natural disasters and many more developments, positive and negative. The task of our team, (in which we performed very well) was to position ourselves in reaction and anticipation to these events within a strategic asset allocations. The goal was not to hit tops and bottoms within a heavily traded portfolio but to take longer term investment decisions with the goal of value aggregation due to economic developments in the worlds' regions.

Throughout we kept a well diversified portfolio of assets, this can be seen in the pictures below.





Overall we came up 4th out of 12 teams. Yes, not the first place, but we weren't far away. Throughout the entire duration of the competition we were in the top 2-3 teams. The Vice-president of asset allocation and organiser of the event complimented our team in front of everybody to have been his favourite, as he believed we distributed risks well, with a sound strategy. What counts is that we generated ~30% of returns and we beat teams, such as Oxford, Manchester, Warwick, Cambridge...

Profit and Trading



Real estate was the 3rd highest earning asset after Equities and the Asian Currencies. Our frequency of trading was lower than average which also shows that next to diversification we didn't over-trade.

Finally three teams were picked to present in front of everybody in the room how and why we made our portfolio perform in the way we did. I was picked by my team-mates to take on this task, so I did and I gave a convincing little presentation.

The final standings



Our Team



Thanks to all my team-members for making this a great and fun event for all of us.

Friday, April 23, 2010

Stockmarkets (Profit Summary)

In my prediction from my Blog-post on Thursday, January 28, 2010 "Stockmarket on the Rise" I predicted short term (1-3 months) positive growth of about 6% to 5600 (for the FTSE) and potential gains of 10% for more mid-term holding periods.

It turns out this prediction was spot on right, and looking back a good deal of money could have been made on this recovery push on FTSE index futures of ETFs.

Currently this is where we are price-wise on the FTSE index (source: yahoo finance)



In fact, let's look at what would have happened if we'd traded long (buying / speculating on an up-move in the market) over the period, which is the trade you'd do given my brief analysis from 28th January.

Bought at the non-optimal price of 5142.2 and sold at the common price over last days and not quite high of 5820. The transaction size being the smallest allowed with most brokers of only 3 pounds-per-point, then the profit generated would have been a respectable £1'800 and bagging in a 12% profit. This would be even higher would it not be for the daily financing costs of the trade. Table below summarises such a trade:

Thursday, April 22, 2010

Selected for PiP Challenge

So I've been selected to take part in the 'Portfolio in Peril' Morgan Stanley challenge. This is a competition of various university teams competing against each other within an investment management role. The idea is that as a team of 8 we will have to manage a multi asset portfolio over a simulated period of 4 years. The various asset prices and news and macroeconomics will be generated over 8 decision periods.

Its next week and all expenses paid, down at Morgan Stanley's London offices. Even thought an element of luck will certainly be involved... It's going to be fun :-)!

MSc Courseworks

I have now finished teaching the MSc module at Loughborough, so I thought it would be fitting to write about my impressions on the blog. As always teaching can be intimidating at first but in my case I felt very much at ease having taught the BSc class last semester. Rightly so, lets compare the BSc with my MSc experience:

MSc. vs. BSc.

  • BSc. class was huge (150 students) compared to 16 students in my MSc class. The great thing is that I could build a more personal relationship with the individual students. You can actually remember their names and very soon you get a good idea how good every individual is.

  • Since the group was much smaller I found that; the dynamics in the class were less formal (Students asked more questions and I encouraged them to). It was a small and enjoyable class to teach.

  • In a way I hate to say this but the MSc students were certainly brighter and hence the material could be covered at the lightning speed of 2 weeks. When you have bright students it's a pleasure to teach. On the other hand I should say many of my BSc students were also pretty decent and I did have lecture time to cover XSS and all kinds of funky JavaScript, including some JQuery.

  • Big negative with the MSc class. There's just too little time to cover everything to my unilateral ideal of great learning in 2 weeks that is alloted for a fat-module. Then again I can't fight the system and the class was supposed to teach strong foundations but it wasn't meant to make superstar programmers out of my students in 2 weeks, but of-course I would have loved that challenge!


The assessment for the MSc course consisted of a 40 minute in-class test on paper and an programming coursework (over a week). The coursework was to build a sudoku JavaScript board game skeleton that allows a player to load puzzles (81 long integers) and play on the 9x9 board with the basic 3 sudoku rules enforced. In addition the possible numbers for board elements had to be suggested.

A number of solutions were done very well to the specification and showed good understanding of my students. Here is an example coursework by Tomas Kavaliauskas.

Saturday, March 6, 2010

Tomcat on XAMPP server

XAMPP is a wonderful light weight open source web-server package. I recently bought one of those little netbooks and wanted to set up a local server to play around with jsp and php.



It turns out XAMPP is just perfect for this, as it the basic installation comes with php apache, mysql and there is a separate plugin for tomcat server. The installation is easy, just two things to consider and you should be off to server side coding adventures.

- php root folder on localhost: ...\xampp\htdocs
(the place you will put your php pages to, and to access them from a web browser type http://loopback/ or localhost)

- the equivalent tomcat folder will be in (xampp\tomcat\webapps\ROOT) this assuming you followed standard installation steps. To access this location in a web browser you might have to type something like, http://localhost:8080/ (the tomcat server is on port 8080, since 80 is in use by apache)

Tuesday, March 2, 2010

I'm teaching MSc students!

Next to my current research and various part time work (I am consulting two companies at the moment in web system design and data mining applications), I am about to start teaching the Client Side programming course COP451 for the MSc course.

This will be a fat module course, and a much more intensive version of the COA122 JavaScript/DHTML undergraduate course that I taught last semester. Since there are only 2 weeks, this course will be very intensive in terms of a lot of new material being covered over a short term span.

I favour an alternative teaching style to engage my audience by justifying the need of particular methods and technology! This is facilitated by communicating abstract and clear concepts in a down to earth, easy to understand manner!

Procedural Programming Concepts
- Basic Operands and Operators
- Loops / Repetion
- Branching
- Methods (Divide and Conquer)
- Fundamental Data Structures (arrays, dictionaries...)

Client / Web UI Programming
- Basic Webdesign (HTML/CSS/JS-includes)
- JavaScript in a web architecture context (conceptual keypoints)
- DHTML: addressing page elements via DOM with JS
- Building DHTML client-side applications and board games

The goal of the course is to educate the students on fundamentals for programming and bring the world of the web alive through applications of JavaScript at the same time. I also focus on issues regarding proper coding and testing practices, code team-work, time complexity and a number of other things.

Last semester has shown on a group of ~150 students that teaching fundamental programming with JavaScript is a very effective method for three reasons.

- Simple language (basic subset of JS)!
- Ready interpreter in the form of a standard Browser (IE, Mozilla, Chrome, Safari...)!
- Visual results (DHTML pages) and can be used by students straight away for all kinds of applications!

Thursday, January 28, 2010

Stockmarket on the Rise



Shown is the FTSE-100 index over the past 2 years, as I am sure you can gather from the chart without much of Technical Analysis experience, there is now an uptrend / recovery ongoing. Since about July 2009 the capitalisation of UKs top companies increased by about 30%... pretty strong growth if you'd ask me! (actually this isn't growth as such, but the immediate prospect of financial failure probability rapidly having disappeared...)

See the 5 year chart here, to gain a fuller picture of where we are in terms of historical price behaviour.

Conclusion: Speaking from a Technical Analysis perspective, we can expect a rebound and further short term (1-3 month) growth in the market, i.e. 5300 to about 5600 points, thats about 6% growth in the immediate future with a potential to cash in on a good 10% growth in a more mid-term time frame!

Fundamentals aren't so interesting, but to be honest, compared to where we were a year ago (politically, economically,...), things are looking rather good! i.e. 1% economic growth, housing/morgage figures, (+)ve anticipation of general elections, ... on the other hand, the tax cuts are wearing off (VAT back to its old level), threatening taxes & regulation for investment/corporate banks...

...any comments, please feel free, I apologise for the moderation, but with all the spamming going on I am sure you understand. Thanks.