Thursday 13 November 2014

My Experience With Quantitative Finance:

UPDATE (12/04/2015):

From tomorrow, technical analysis reports will be uploaded weekly as a result of the lack of sleep I'm beginning to get from my computers firing up at 2AM every weekday. Moreover, as a medium term quantitative system daily reports weren't exactly necessary anyway.

Swiss markets are now fully integrated and for the mean time this will conclude the stage of adding more markets to the system, while the configurations are tweaked to maximise returns.


UPDATE (04/04/2015):

The system is currently throwing a wobbly regarding analysis of US equities, but French equities have been added and it is my plan to add Swiss equities as well over this easter weekend.

Continued progress is being made in altering the system configuration to reduce down-side risk in the system via stochastic oscillation.


UPDATE (04/03/2015):

The foreign equity markets that are to be analysed daily have been decided as the following:

UK, USA (NASDAQ for the time being), Austria, Belgium, Denmark, and Italy.

In theory the coding required to be changed for this to happen is easy, but I'm waiting for my friendly computer programmer to have a little more time on his hands, so we can get this sorted.



UPDATE (03/03/2015):

The system is currently being configured to work across foreign stock exchanges (not foreign currency markets); therefore output values for these markets need to be remembered to be viewed as in their traded currency - so as to avoid having to make foreign currency assumptions.


UPDATE (22/02/2015):


The system remains slightly odd, in that it's not really designed to trade for you (it could if I wanted it to), but to be a tool to make trading easier and create technical trading ideas that can then be backed up with fundamental analysis to see if this corroborates the technical signals.


The basic principal remains that it uses Fibonacci Simple moving averages (3, 5, 8, etc, up to 233 days) but now with a slow stochastic oscillator over a 14 day period to trade. It then throws a load of volume restrictors, coefficients and thresholds in there too, to make the whole system harder to understand, but more importantly to avoid mis-signaling


The major flaws are that it currently factors in no slippage and no spreads. It buys at the beginning of the day and sells at the end, depending on what buy/sell signals have been produced - it literally buys when buy signals are made and sells when sell signals are made.


Nevertheless, a lot of configuration of the coefficients alongside the raw theory of the system yields impressive results regardless of these underlying issues:



The best yearly backtested results so far (starting with £100,000):




- £200,929 average closing value of the held stock, plus the current funds.

- £98,356 average Top Buy Signallers' closing value of the held stock, plus the current funds.

- £106,271 average Top Sell Signallers' closing value of the held stock, plus the current funds (NOT HUGELY RELEVANT - DESIGNED TO BE USED LONG ONLY).

- £338,126 average closing value of the held stock plus the current funds (winning positions).

- £844,844 average closing value of the held stock plus the current funds (losing positions).


The best yearly backtested results over 13 years and around 250 days - depending on leap years - (starting with £100,000):



- £450,151 average closing value of the held stock, plus the current funds.



- £336,276 average Top Buy Signallers' closing value of the held stock, plus the current funds.

- £463,513 average Top Sell Signallers' closing value of the held stock, plus the current funds (NOT RELEVANT - DESIGNED TO BE USED LONG ONLY).

- £615,899 average closing value of the held stock, plus the current funds (winning positions).
- £601,546 average closing value of the held stock, plus the current funds (losing positions).


--------------------------------------------------------------------------------------------------------------------------

Anyone unfortunate enough to have wondered onto this webpage may know from some of my earlier posts that I'm currently working on a quantitative finance program.


Although I would never be so arrogant to assume that my program is unique, I'm not going to go into detail for obvious reasons of secrecy.


Nevertheless, from a general perspective, the program is designed to function on the UK stock markets and aside from crunching a load of cool numbers in my terminal window and spitting out some results, it looks for stocks traded in GBP with higher than average daily volumes and runs a moving average system along with a stochastic system over the top of these stocks to then "trade them" through the backtesting process.


So, in raw terms these numbers get calculated, processed and make buy and sell signals, which the program then uses to suggest buy stocks (on the buy signals) and then suggest you sell the positions (on the sell signals). The system doesn't short sell securities and is designed as a long only trading system. Neither is the system fully automated, it's designed as a semi-automated system that merely outputs data that is then acted upon by the individual.


Although the program is know where near finished yet (there's a lot of theoretical tweaking that needs to take place and I'm considering designing it to perform over just one industry sector along with a whole host of other things), I've certainly learnt a couple of things about the power of quantitative finance systems:



1. When facing a battle against these systems the average private investor will pretty much always lose.

- This makes logical sense, because the people behind the most famous and powerful quantitative systems (Man Group, etc) are going to not only be the best in the industry, but some of the smartest people worldwide.


2. Their strategies are constantly evolving.

- In the algorithms behind my trading system, my team considered making it fully or partially genetic (at least in the way it calculate positions it should buy or sell). So, it would evolve by itself as a system to improve with less manual input from my team.

- Now, not all quantitative systems are genetic, because it throws up a whole load of issues (they can end up leaning backtesting biases, change the whole ethos of the program the system they're meant to be running from, etc), but this is just an example of the level of sophistication that the funds running these systems have.

- Even if they are not using genetic programming, these systems are constantly being tweaked for performance by whole teams of programmers and mathematicians, meaning that the laypeople rarely get a chance to truly understand the systems or fight back.




I think that as more finance becomes automated and or based on mathematical principals, it becomes more important for people to at least have a vague understanding of these systems and how they work. If you can at least understand the principals of these systems, their advantages and disadvantages then you then can give yourself an advantage as these systems move into more illiquid and private investor concentrated markets (like AIM).


Some useful watching for those interested:

A look at algorithmic trading:
https://www.youtube.com/watch?v=OINqYdkhOAw

A look at HFT trading:
https://www.youtube.com/watch?v=aq1Ln1UCoEU



Cheers,

The Masked Stock Trader

No comments:

Post a Comment