Creating Algorithmic Trading Portfolios with Quantopian (PART II)

In this post, I will be documenting a few of my strategies. The Two Divide in Universe Selection From my personal experience of hacking up strategies and browsing the forums for interesting topics/ideas, I found that there are often two divides in setting up the universe of stocks to trade.  The first being that a specific subset of stocks are hardcoded in the initialize phase, with most securities being a type of ETF that track some broad market.  This method has particular advantages such that it provides low commission, large diversification benefits and global exposure.  Disadvantages can include lack of alpha, high […]

Continue reading →

A Forex News Trader called "Newspaper"

School is continuing as usual and I have been doing a lot of reading in portfolio optimization/management as part of my position in The Fund.   Recently, I've been coding on the side for an automated forex trader that trades off of economic indicator releases.  The other algorithmic pursuits I have been working on such as AREMA, etc hasn't been working well.  I spent a lot of time on debugging it but when it comes to backtesting, it is very difficult to churn a positive profit.  I haven't bothered with the machine learning aspect of it either but it might be […]

Continue reading →

Autoregressive Exponential Moving Average Forecasting

I've recently been looking into an automated strategy to implement to my forex trading. School has been real busy and I haven't gotten much time to do technical analysis so I think it'd be better to explore robot trading. In this post I'll be discussing my strategy, it's properties and an example with a simple out-of-sample forecasting benchmarking against an ARMA(2,2) and Random-Walk naive prediction. In the next article, I'll write about implementing it in MetaTrader (MQL4).   An exponential moving average is an extension of a simple moving average where more of the weight is being placed upon the […]

Continue reading →

New Features, New functions, Lower errors

This will probably be the last post I have regarding PAM.  All the project files can be found on my github page.   I don't think I'll be working with her anymore as I don't think theres anymore methodologies to drastically improve her error with JUST price action.  It's not worth my time and I need to move on.  I introduced some new features such as Gap, Previous ratios, etc.  They did lower the errors again. I have come a long way from validation errors of approx 0.6938 to 0.4955.  Out-of-sample pairs forecasting is still inconclusive as the model did […]

Continue reading →

Implementing Trader into PAM

As a follow up from the previous post, I made quite a few errors designing Pam's feature input and have now fixed them.  In addition I introduced Pam two new features: Body Length ratio between current candle and last candle Body Length to Wick Ratio of current candle I retrained Pam with a very high lambda and less amount of nodes () .  The model overall had a better Validation and Testing fit.  I also skipped out on adding polynomial features for now and only relational (ex: ) features. I decided to bring it to the test set of EUR/USD […]

Continue reading →

Meet Pam

Project files repo Pamela, you can call her Pam, recently started Forex trading.  She is a complete beginner but she is extremely hard working so I believe she can be profitable soon. Pam, unlike most forex trader, is not human.  PAM's name derives from Price Action Machine, an artificial neural network that currently learns from candlestick patterns on currency pairs.  She has a simple neural network structure as such: With number of independent (feature) variables and number of nodes in the hidden layer.  The connections between input to hidden and to output consists of two matrix of weights.  We can call them […]

Continue reading →