Click here to Login




Trading the Strategy Equity Curve

Updated on 2016-04-08





The idea consists of turning a trading system on and off based on its equity curve. For example, you can turn the strategy off when it drops below a certain level, reaches a low or crosses below/above its moving average.

Let us say you create a trading system that enters long when the RSI is overbought and exits any existing position when the RSI is oversold.
After backtesting your strategy, you notice that the strategy's drawdown is too high and thus decide to implement a mechanism that turns the strategy off (stops investing in that strategy)
when the drawdown reaches -15% and then turns the strategy on when the drawdown become higher than 15%.

The meta-strategy tool of QuantShare would allow you to implement such idea very easily. Let us see how.


Trading System

First, let us create the initial trading system.

- Select "Analysis -> Simulator"
- In the simulator manager, click on "New" then select the "Strategy" tab at the top
- Click on the "Create trading system using the formula editor" tab at the below panel
- Enter the following formula:

buy = rsi(14) > 70;
sell = rsi(14) < 40;


// Enter long when the Relative strength index is above 70 (overbought) and sell when it is below 40 (oversold)

- Select "Symbols & Dates" tab then define the securities to include in the simulation as well as the simulation start and end dates
- Click on "Create Trading System" then name it "TEquity1" for example.
- In the simulator manager, click on the "Simulate" button at the top

After the trading system report is displayed, you can see the equity curve at the bottom displayed in a chart.

To learn more about how to create trading systems, please check this blog post:
The Ultimate Guide to Create Trading Systems in QuantShare


Meta-Strategy

In order to trade this equity curve, we need to create now a meta-strategy.

- Select "Analysis -> Meta-Strategy Simulator"
- Click on "New" then select the "Meta-Strategy" tab
- Click on "Add/Remove Trading Systems", check the "TEquity1" trading system then click on "Load Checked Item(s)"
- Click on the "Strategy" tab then type the following formula:

d = drawdown() * 100;
buy = d > -15;
sell = d <= -15;


// Since this system will trade the "TEquity1" equity curve, it will instruct the simulator to invest in the strategy only if its drawdown is above -15%

- Click on "Create Meta-Strategy" then type a name
- In the meta-strategy manager click on "Simulate" to backtest the meta-strategy


In this basic example, we have included just one trading system in the meta-strategy but of course you can add as many as you want. You can create advanced logic and also implement money management scripts in C# (as you would do with a simple trading system).

To learn more about the meta-strategy tool, please check this blog post:
How to Create Your First Meta-Strategy












no comments (Log in)

QuantShare Blog
QuantShare
Search Posts




QuantShare
Recent Posts

How to Use the Percentage Scale
Posted 299 days ago

QuantShare
Previous Posts

Trading the Strategy Equity Curve
Posted 535 days ago


More Posts

Back







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 2017 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.