Click here to Login





                                                   Trading "spreads"

  0

0
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





Hedge a portfolio strategy (by QuantShare, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads Notes Report an item

No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
The Best trading rules for the ADX technical indicator
Ultimate Trading System
Trading based on Boillinger Lower Band position on defined Market
Stop Trading Based on Your Portfolio Equity Return
Trading the Equity Curve

How-to Lessons
How to generate buy/sell signals from a trading system
How to get trading orders from a portfolio programmatically
How to add a trading indicator to a chart
How to optimize the number of positions in a trading system
How to set order type of a trading system programmatically

Related Forum Threads
Pair Trading Strategy would be nice!
Pairs trading
Problem with "Save Trading System" in Optimizer
Create a trading system
Trading System Simulator reports into future

Blog Posts
True portfolio simulation applied to trading systems
How to Create a Custom Real-Time Table using QS Trading Software
How to Download Trading Data for Certain Securities Only
9 mistakes you should avoid when backtesting an end-of-day stock ...
4 indicators to create adaptive trading systems









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2025 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.