Jan
21st

Research results of Systematic / Algorithmic Intraday trading

Posted by admin

So with a few months of research, I’ve been through some of the pain of coming out good strategies be it short term speculative, trend trade, mean reversion, spreads, or just plain time based trading strategies.

These are just some products that are currently on my system:

  • US markets Top 10 Volume (so the spreads are 1 cent away, with high volatility/beta though)
  • US markets?Top 10 Volatility (must satisfy good spreads)
  • Futures markets (Global Index, commodities)
  • Correlated US Stocks

Some findings base on my systems:

  • Good spreads and volume helped reduce slippages costs, based on Market orders
  • Volatility means more trading signals, but does not necessarily means profits
  • Futures can be traded like stocks with the same systems, but some trading basics got to be identified and applied.
  • eg. Nikkei 225 Futures lacked the “Point” by point spread, instead they are traded with a 5 points per tick, making it hard for Alpha due to the spread.
  • On the contrast, the Hang Seng Index futures are great way to trade, because of the tick value.
  • Markets are definitely correlated. Systems are up on 20 hours a day, from 8:00am GMT +8 Asian time, to 5:00pm EST US Time.
  • By running systems to handle the risk from Hang Seng to Nikkei, and over to Nasdaq and the S&P500 futures, including WTI Crude from Europe to US times, you can see some correlation when one market moves, so is the other, and how the algorithms act upon these information, intra day.
  • On the opening bell from 9:30am – 10:00am EST, and on good days (prices are short squeezed onto the Long or Short side), returns can run up to $300-$500, and before 10:00am, it can capture quite a good day’s worth of profits. But so are the risks, when there’s only 10% of the time with such opportunity, and 90% probably losing up to $100-$200. This will be refined and optimized.
  • Some of the Algorithm cannot detect what is a random price action and what is an ‘actionable’ trade. So some results are therefore random and something only the system can only manage, but cannot act upon by forecasting or prediction.
  • Fortunately, some US Stocks can produce consistent results, even after trading a >5000 shares a day for many many days. o:-)
  • For a typical day when all systems are used and all products are added, trades can run up to 500-1000 trades a day, and over a value of USD 2 Million worth of shares traded.
  • Adding all up, however the Equity curve are still negative, and points in an inverted 45 degrees, with only about 25-30% of winning ratio and Average/Trade at a negative value

Ahh, some of these stuff are pretty good for record keeping, knowing what works and what not. Thinking back on the days where I had made a few hundreds on an intraday, it spook me to realize how much risk Im actually putting on to produce that kind of returns, that is always inconsistent. Now that the programming of these systems comes at a snap of my fingers, it’s quite easy to “optimize” and fine tune the results.

In my current phase, optimizing the systems for speed and efficiency is a top priority. Tweaking and playing around with the numbers so the magic happens; frequency of signals/trade goes down (reduces brokerage fees) while Profits goes up (cutting useless stuff away).

Also, I have introduce a new strat using pure mean reversion and short trend systems (to counter the mean reverts), and just this system alone is able to produce quite a good run.

So… 3 objectives to meet in 3-6 months time:

  1. Trading of more products eg. Futures & Equities, essentially a system able to manage in excess of at least USD 1 Million
  2. Average profit per trade > 50 cents, or the Win/Loss ratio > 40% for consistency of at least 100,000 trades over 3 months.
  3. Sharpe ratio > 3

Cool, what a post. Next, I’ll be updating my fund performance on my asset allocation base strategies and how they are doing over the past 2 months… (glancing over Municipals Bonds, it was a good bet and a good add to my portfolios since the S&P downgrade in August 2011 =:)

Dec
8th

Running Automated Black Box Robo trading with Excel

Posted by admin

A dream ? Running my own prop trading
My dream is to start my own Prop trading operations. With all the past 3 years effort of studying those crap books with Systematic trading, backtesting, technical indicators, emotions and psychology, risk management, and quantitative finance, strategies development.

If that’s not enough, my business, marketing and finance skills comes in. Whether to sell my signals to brokers or Collective2 (A website for investors to subscribe to signals), proposing to Proprietary Trading firms for a small $1M seed and trading from home, join some Asset mgmt firms to expand and automate their operations, Investment banking Prop trading (I think those IBanks not in US/Europe are not affected by the Volcker rules.. saw them hiring.. hmmm?), or finally, getting 20 machines on my living room day trading FX, different Futures , trading on HK, UK equities on a 24/5 operations?:)

http://www.collective2.com/

http://www.zignals.com

Hmm just what is in my system you wonder. What actions are coded in ?

Risk mgmt:

  • Cutting losses
  • Trailing stops for profiting trades
  • Leveraging 2x on winning positions
  • Day limits, profit or loss

Mixed it with a good combination algorithm and a good strategy is formed:

  • Short Term buying pressure – Time base on opening and closing
  • Trends – Pythagoras theorem (Couldn’t believe I was using my High school Maths!)
  • Breakout – Your usual sudden spike, perhaps some news or HFT gone wrong :)
  • Counter reversal – As a protection, high risk high returns.
  • Mid term Highs and Lows – Time base strategies
  • Pair trading, Spread trading, Contrarian Stat Arb

http://en.wikipedia.org/wiki/Statistical_arbitrage
Examples of trading systems

Some characters of the trade:

  • Scalability – To UK or Asia Equities, FX markets, Futures. Anything on Electronic trading :) (That Interactive Brokers have access to)
  • 15 seconds to 60 minutes each trade – nothing more, nothing less
  • No overnight positions – Part of the work is to ensure all trades are closed.
  • Packaging algorithms like building a Personal computer – Customize the Algos you want for a product in a 3-in-1, 4-in-1 fashion. Essentially taking out those that doesn’t work.
  • Playing of wav files. This is so exciting while I am playing Facebook, Market opening bell and Jackpot sounds are being played. Its automated really :)
  • And much more…

http://www.stocks-trading-strategy-and-pattern.com/intraday-trading.html

http://en.wikipedia.org/wiki/Day_trading

Why Excel ?

So the idea is to build my Strategy into Excel, merge it with TwsDDE.xls such that buy and sell orders are generated into the system automatically, errr… on my paper trade account. Maybe you were thinking Excel sucks, and that ActiveX or DDE sucks. Why not use Java, why not C++, C#, why not monitor 10,000 stocks positions with Level 2 quotes of 10 Bids / Asks, and Volume, News and bla. Bla.

http://www.interactivebrokers.com/en/p.php?f=programInterface

Interactive Brokers-Excel DDE

If that is what you want to justify, this post is not for you. The idea is to prove rapid development with Excel Macros and VBA disgarding speed of execution. (I actually got a 4x core CPU and Office 2010 for multi-core/thread) And save the hassle of programming, but rather focus on the the strategy development, and easy trade inputs. The Excel twsdde is easy to use, just set the right cell and hit the macro action. You’re on your way to running your own Automated trading.

Now everyday when I peep over Neikkei 225 or FTSE or Mini S&P500 futures I do wish its < or > 1%, else Do nothing. In fact I hope markets get volatility or crash, since I can go long or short. Or, too much of programming hehe.

http://www.barchart.com/futures/

Now if you are thinking of asking me to help you, a retail trader with less than $10,000, to build a system, be it on the development side with Excel programming, or helping you with a “Strategy design”, forget it. I would wish to help you, but I’ll rather start my own system, play computer games, rest, sleep, wake up, and realize I’m $200 richer on a realized gain with no overnight positions.

Surprisingly, alot of Proprietary trading firms, Hedge Funds, and Broking houses (esp in Singapore), are still on discretionary trading when they should be automated, including those prop desk where risk a trader’s risk should be quantifiable and cut when breached. A good thing that market makers and Big Banks employ alot of smart Quants to do their Algos, helping to drive costs down and improve liquidity and market executions.

Ahh enough of typing. bull shit, loads of information here from my experiences but a $0 / hr job. At least my spread trading works :) . Time to search for pairs with good co-relation and co-integration.

Good luck to your trading guys !

Dec
8th

Exploring Algorithmic / Black Box / Robo Trading

Posted by admin

Very Volatile markets
In case you wonder what’s up with me these months. It has been a fruitful 6 months, since I started working with Excel, Maths, Models, Historical Data. Take these together and I call it Monte Carlo Simulation.

Initially I started worked with producing Pure Random data, with volatility parameters to simulate the Brownian motion of stock prices. Comparing SGX and NYSE, its a different way of coding it, anyway I was trading the US markets.

http://en.wikipedia.org/wiki/Monte_Carlo_method

So then came along Algorithms, the things that say if A is X and B is Y, then it A/B = 0.02 and bla bla yada. That’s how I came up with my first “Algorithm”, designed to detect market movements and pressure, be it up, down or sideways. By the wy, this was history because it was used as a platform to test out my Monte Carlo (Hail the great 1st Algo!!!)

Great learning though, things like Fat Tails, Probability Distribution Function, Law of Large numbers, Curve fitting, Real life trading, Cut loss simulations and certain Black Swan Scenarios were built in to “Stress” my Algorithm. Then I came up with more and more Algos, Algos that are supposed to detect and manage different stuff, like Breakouts, Opening / Closing, Spreads, Trends, Reversal, and etc…

http://en.wikipedia.org/wiki/Algorithmic_trading

They required more CPU x core speed, and tons of Excel spreads running on my 3 computers, about 30+ of them dealing with different paramters, volatility, different pricing models, etc etc… That took me 2 months.

Computers meets Wall Street

Then it was easy; With random data running all over my Excel, I soon replace them to take in Data from Finance Google. Nevermind HFT running level 2 quotes, trying to Front run Bids/ and Asks at 900 microseconds, (the link from SG to NY is 300 ms on average all major ISP, unless I colo my system to US :> )

http://en.wikipedia.org/wiki/High-frequency_trading

Pulling data from Google Finance was easy. I started coding in Human reactions, or things you would do or behave, automatically. Eventually, I’ll complete the task: Interactive Brokers TWS platform, with my excels connected to its TwsDDE.xls. See my next blog post. It’s magic :) .

Automation vs Manual

As a Portfolio of strategies, I now allocate my capital of 40% to this Algorithm trading, and 60% to all the other strategies including Asset Allocation based long term trading and other derivatives strats.