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.