Showing posts with label Algorithmic Trading. Show all posts
Showing posts with label Algorithmic Trading. Show all posts

Thursday, 3 December 2015

Developing Trading Strategies

Disclaimer: As per usual, I don't have a licence to distribute financial advice, so this should not be viewed as content intended to advise individuals/institutions on a financial level.



The lack of a clear trading strategy is one of a few key features that separates out the successful traders from the unsuccessful traders. 

Traders/investors without clear strategies have a tendency to commit the following "crimes":


  1. Buy high and sell low
  2. Over sizing their trades
  3. Not managing their risk


While points 1 and 2 on that list are important, the most important point for developing any profitable trading strategy is point 3 - professionals say that what separates out institutional investors from retail investors is invariable the managing of risk rather than the investments they make.


Building a strategy:

While the idea of "building a trading strategy" tends to conjure the image of a technical trader or quant, the reality of the situation is that anyone who takes the time to write down even some trading rules that they then have by their computer will outperform traders who don't.

Even if these rules are as crude as "Place a stop" or "split your order", as long as they're not fundamentally stupid rules they will help your performance.



In addition to this, the markets that you trade will also be an important factor in building a strategy. Traders of larger capped equities, ETFs, commodities and currencies will all benefit from strategies that link their position entrance to market movements - limit orders placed in the market ready to be executed.

This has a couple of added benefits to traditional market orders:


  1. There is a tendency amongst traders to jump the gun and enter too early with market orders before their trade pattern/reason has been confirmed as valid by the market.
  2. This acts as a further risk management tool, as the market only takes you into trades that are validated by your signal.

It's worth noting that in the trading of smaller capped equities this style of trading will only likely cause risk management issues, as the heightened volatility caused by wider spreads and lower order book weighing on each side of the book means that your chances of being entered into the market on a mis-signal are raised.



Signal Generation:

After you have developed your risk management system, the next step will be to develop your signal generator.


Signal generation can be highly complicated or it could be as simple as a moving average crossover, or a P/E ratio.

I am a fan of the backtesting of strategies to prove that they have some form of historical bias towards making you money, so if you are a good programmer or know someone who is, test out your strategy first! 

The Yahoo Finance API should be available for gathering daily closing data and ranges so this could be a good place to start if you want to technically test a strategy. For guys in the US, Quantopian is a pretty handy tool too for testing strategies.







As and when I think of more to add here, I will update this page.


Cheers,

The Masked Stock Trader

Monday, 13 April 2015

Free Weekly UK Technical Analysis 13/04/2015

DISCLAIMER: I am not FCA authorised or authorised in any sense to give financial advice. Do not regard any of the following links, or information as investment or trading advice.


N.B. Currently FireFox does not support Google Drive and therefore these reports may not open.


This Week's Analyses:

https://drive.google.com/folderview?id=0B0wd9XTIWftmfnFpOVFMZlljaDRBSVNaTzEtZURmVlg4QlFKSkN6WExqMUJRczBBMGdUVU0&usp=sharing

How to use these reports:



More information regarding this project can be found here:


Wednesday, 8 April 2015

Free UK Technical Analysis 08/04/2015

DISCLAIMER: I am not FCA authorised or authorised in any sense to give financial advice. Do not regard any of the following links, or information as investment or trading advice.


N.B. Currently FireFox does not support Google Drive and therefore these reports may not open.


Today's Analyses:

https://drive.google.com/open?id=0B0wd9XTIWftmfnMtRURPOWZVQlluT1FHQ2NaVnJPR1RFQ0NYV1UwOFBhNXNlUHF6TlRJRFE&authuser=0

How to use these reports:



More information regarding this project can be found here:


Tuesday, 7 April 2015

Free UK Technical Analysis 07/04/2015

DISCLAIMER: I am not FCA authorised or authorised in any sense to give financial advice. Do not regard any of the following links, or information as investment or trading advice.


N.B. Currently FireFox does not support Google Drive and therefore these reports may not open.


Today's Analyses:

https://drive.google.com/open?id=0B0wd9XTIWftmfkRPeVFOZTBIa1E5OWlNUjRRMmRPSi1Oblo5WUlNRDdMUUdhLWdHTXhwajQ&authuser=0

How to use these reports:



More information regarding this project can be found here:


Thursday, 2 April 2015

Free UK Technical Analysis 02/04/2015

DISCLAIMER: I am not FCA authorised or authorised in any sense to give financial advice. Do not regard any of the following links, or information as investment or trading advice.


N.B. Currently FireFox does not support Google Drive and therefore these reports may not open.


Today's Analyses:

https://drive.google.com/open?id=0B0wd9XTIWftmfnExRF95ODdCallJSHRMU1ZpNG5BbFVEOXNzNWdsR3hIckxJUkhfSnVLNkk&authuser=0

How to use these reports:



More information regarding this project can be found here:


Wednesday, 1 April 2015

Free UK Technical Analysis 01/04/2015

DISCLAIMER: I am not FCA authorised or authorised in any sense to give financial advice. Do not regard any of the following links, or information as investment or trading advice.


N.B. Currently FireFox does not support Google Drive and therefore these reports may not open.


Today's Analyses:

https://drive.google.com/open?id=0B0wd9XTIWftmfkxvNVFLTW5KZWdWbVVVMHlzTjlKV1VDaE5VcnZvSTJqSjFmeWZqeGdLQXM&authuser=0

How to use these reports:



More information regarding this project can be found here:


Tuesday, 31 March 2015

Long Westminster Group

Morning all,

None, of the below is investment advice as I am not FCA authorised.


I sold out of my long position in Tungsten Corp this morning for a reasonable 8% profit and have moved this into Westminster Group (WSG) at 26.20p.

This is another technical trade, for which the premise for the trade can be found below:



  • We have now reached the January/February support level at 26p, with further downside support at the 24p level.
  • If the resistance at the 100 day SMA of 27.9p is broken, then it wouldn't be unreasonable to look for the 33-35p range seen on March 6th, as the breakthrough of the 20 and 10 day SMAs will come a lot easier as they're in downtrend to the more significant average at 100 days.
  • The "Riddler Effect" is also in play here - a term used to describe the trader known as "Riddler" on London South East declaring an entry into a stock and people following his analysis and trade ideas.
  • The slow stochastic oscillator is showing some very oversold readings in accordance with the RSI, which in the low 30s is also suggesting an oversold state in the market.
  • An extension of the January/February support level at 26p to the current price action could suggest a bullish descending triangle is being formed.
Cheers,

The Masked Stock Trader

Free UK Technical Analysis 31/03/2015

DISCLAIMER: I am not FCA authorised or authorised in any sense to give financial advice. Do not regard any of the following links, or information as investment or trading advice.


N.B. Currently FireFox does not support Google Drive and therefore these reports may not open.


Today's Analyses:

https://drive.google.com/open?id=0B0wd9XTIWftmfklaSldoYWR6aGZ2SU8xbzZDUjlMdnlSbzU0MEVsT25nOFhPRDZtY1FtTGc&authuser=0


How to use these reports:



More information regarding this project can be found here:


Monday, 30 March 2015

Free UK Technical Analysis 30/03/2015

DISCLAIMER: I am not FCA authorised or authorised in any sense to give financial advice. Do not regard any of the following links, or information as investment or trading advice.


N.B. Currently FireFox does not support Google Drive and therefore these reports may not open.


Today's Analyses:

https://drive.google.com/open?id=0B0wd9XTIWftmfkpBWW1PTl85NENjakJGcVVhWWVGT1g2Y1JSS3JVTkRaRkI3QXdiQXdGc3c&authuser=0

How to use these reports:



More information regarding this project can be found here:


Free Italian Technical Analysis 30/03/2015

DISCLAIMER: I am not FCA authorised or authorised in any sense to give financial advice. Do not regard any of the following links, or information as investment or trading advice.


N.B. Currently FireFox does not support Google Drive and therefore these reports may not open.


Today's Analyses:

https://drive.google.com/open?id=0B0wd9XTIWftmfnlNel9adGZISzNOVU1peEwzM2hwaWY1UldsN1I5Si01S3VoUzEyLTQ5WGc&authuser=0

How to use these reports:



More information regarding this project can be found here:


Thursday, 26 March 2015

Free UK Technical Analysis 26/03/2015

DISCLAIMER: I am not FCA authorised or authorised in any sense to give financial advice. Do not regard any of the following links, or information as investment or trading advice.


N.B. Currently FireFox does not support Google Drive and therefore these reports may not open.


Today's Analyses:

https://drive.google.com/open?id=0B0wd9XTIWftmflotN0hjTG5NMTd2eGQ2T2xyUUFMY05ZUVZhazNwTzUyd1Y4Zkd6ci1SUms&authuser=0


How to use these reports:



More information regarding this project can be found here:


Wednesday, 25 March 2015

Free UK Technical Analysis 25/03/2015

DISCLAIMER: I am not FCA authorised or authorised in any sense to give financial advice. Do not regard any of the following links, or information as investment or trading advice.


N.B. Currently FireFox does not support Google Drive and therefore these reports may not open.


Today's Analyses:

https://drive.google.com/open?id=0B0wd9XTIWftmfldOTEhEU3F4bERMQy1DN1pocjdCLUdfOURxcUxXWmJOMWpEOWVJNDhwVWs&authuser=0


How to use these reports:



More information regarding this project can be found here:




Monday, 23 March 2015

UK Technical Analysis 23/03/2015

DISCLAIMER: I am not FCA authorised or authorised in any sense to give financial advice. Do not regard any of the following links, or information as investment or trading advice.


N.B. Currently FireFox does not support Google Drive and therefore these reports may not open.


Today's Analyses:

https://drive.google.com/open?id=0B0wd9XTIWftmfk9TcGg3ZHJiZDBvMmFSRmZKTWc3S0ZNc3dpMGFoX3NjMDd3TTZKTW5QQ3c&authuser=0


How to use these reports:



More information regarding this project can be found here:


Sunday, 8 March 2015

Free UK Technical Analysis 09/03/2015

DISCLAIMER: I am not FCA authorised or authorised in any sense to give financial advice. Do not regard any of the following links, or information as investment or trading advice.


N.B. Currently FireFox does not support Google Drive and therefore these reports may not open.


Today's Analyses:

https://drive.google.com/open?id=0B0wd9XTIWftmflN6aXZkazRSdGtaZUpxSXplR3RlYkp1OFFvaUtVa3ozVzlGZXd6MUg0Vlk&authuser=0

How to use these reports:

  • http://themaskedstocktrader.blogspot.co.uk/2015/03/technical-analysis-instructions.html
  • More information regarding this project can be found here:
http://themaskedstocktrader.blogspot.co.uk/2014/11/my-experience-with-quantitative-finance.html

Saturday, 7 March 2015

Technical Analysis Instructions

How to use these reports:

  • This system is currently based around Simple Moving Averages (SMAs) that are based around the principals of Fibonacci numbers. These are used alongside a Slow Stochastic Oscillator (SSO) to create buy and sell signals, which are given numbers based upon their strengths.
  • Over time, I adjust the stochastic coefficients and the weightings of the moving averages to create more reliable results during my back testing (for my use), but to also make the system more reliable generally.
  • Attached in the linked folder will be a file called "buysignallers.txt" and "sell signallers.txt", which can both be used to show the position of a stock against the others that are analysed. This is where you will find the total signal strengths for stocks.
  • It is worth noting that not all stocks and shares may load or process due to where the program gets its data from and some stocks with share prices below 0.10p will currently not analyse properly.
  • These reports are all made up of a list of signals and comments and the data for these are taken daily. E.G. Today's signals use yesterday's closing stock prices - given in pence, not pounds! 
  • The "signals" show the fibonacci SMAs that crossover and or any slow stochastic notifications.
  • The "comments" show the value of the said SMA with the value of the previous day shown in brackets.


e.g. 


# Signals
Sell - 24.802226076843513707865168540 - 34 crossed 144

# Comments
SMA 3 - 25.50 (25.50)
SMA 5 - 25.50 (25.50)



  • More information regarding this project can be found here:
http://themaskedstocktrader.blogspot.co.uk/2014/11/my-experience-with-quantitative-finance.html

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