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.

Sunday, December 20, 2009

O(f(n)) notation EXPLAINED... doh

UC Berkley Lecture by Computer Scientist and Physicist Dr. Jonathan Shewchuk, where he really explains a number of misunderstandings with this commonly used notation! It is also a good introduction for the inexperienced ones!

Here it is, enjoy:



Banking Bonuses

It is a sure way to climb the millionaires ladder :-) A path to riches is through the financial sector, and this has been so for many years. Recent criticism of Bonuses paid out to employees of Investment Banks / Funds have just achieved more advertising for these institutions for talented people.

At JPMorgan 1'626 staff received $1 million or more and 27 individuals walked away with a hefty 8 million bonus, at Goldman Sachs this was 21 employees. [source: Andrew Cuomo's recent report on Bank Bonus Culture]

Working at one of these organisations shifts the odds of becoming a millionaire in a lifetime considerably in your favour.

Tuesday, November 17, 2009

C# vs. C

So how efficient is C# really?? In relation to a language like C. Well the answer is, that there is no conclusive answer, yet a set of features of C# where performance matters is investigated in this nice MSDN article.

The article was written back in 2004, and much has improved in the C# world, and not just in terms of VM performance but the language capabilities aswell.