[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Pairs Trading Code



PureBytes Links

Trading Reference Links

Would anyone happen to have written any pairs trading code they would
be willing to share.  I'm looking for something where you can backtest:

1. By selecting/identify two symbols
2. Go long on one and short the other based on a simple ratio of the two
 Ex: IWM/SPY = Ratio
3. Adjust shares or contracts to be market neutral
 Ex: Buy or sell 2 shares of IWM for every 3 of SPY
4. Switch the trade (ie. reverse the position) when the ratio goes
above or below a moving average of the ratio.
5. Plotting of the above to see the buy/sell arrows.

Thanks





Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.11/542 - Release Date: 11/20/2006