 |
allan nathan
2012-10-01 19:44:50
|
|
Hi,
Is it possible to create a ratio of two assets and backtest the ratio according to ones chosen rules?
I know we can create a ratio.
Thanks,
Allan
|
|
|
 |
QuantShare
2012-10-02 10:38:14
0
|
|
What do you mean by "backtest the ratio"? Buy one stock and sell the other one or maybe use the ratio as a trading rule?
|
|
|
 |
allan nathan
2012-10-02 12:58:46
0
|
|
buy one stock,sell the other
|
|
|
 |
allan nathan
2012-10-02 14:50:22
0
|
|
As an example,Ild like to create a simulation that buys AApl/spy when the RSI(14)<35
I do not want to buy soleyAAPL based off that ratio..
|
|
|
 |
QuantShare
2012-10-02 17:23:47
0
|
|
If I understand you correctly:
You want to buy AAPL and SPY when the RSI(14) of AAPL is higher than 35.
Is this right?
|
|
|
 |
allan nathan
2012-10-02 19:04:39
0
|
|
Yes,but want to buy AAPL and sell SPY on AAPL weakness relative to the SPY.I was thinking that when the RSI of AAPL/SPY<35,that would be indicative of what I want.
I did not put alot of thought into the strategy,I was really asking to see if the capability is there to 'trade a ratio'. I typically trade a basket of stocks I find fundamentally appealing and trade index derivatives against it taking on correlation risk.
My next step would be to create an equal weighted basket of my stocks,and create a ratio of the portfolio vs the SPY..
|
|
|
 |
QuantShare
2012-10-03 10:57:21
0
|
|
You can use the following buy rule:
a = close / GetSeries("SPY", close); // Ratio
buy = rsi(a, 14) < 35;
Use the following MM script to hedge your portfolio:
Hedge a portfolio strategy
(by QuantShare,
uploaded several months ago)
No notes
|
|
|
|
|