Your interactive trading laboratory!
22 users online

Model - Larry Connors VXX Trend Following
Created by Q Merlin on 11/18/2018
, last modified on 11/18/2018
Please sign in to save your Models

C# Coded Model

C# Coded Model Tips

These models are programmed in the C# language and utilize the Microsoft .NET framework. A Quantacula model is a C# class derived from the UserModelBase base class.

The Initialize method is called first. Override this method to instantiate indicators or other objects you will need during your model's processing.

The Execute method is called once for each bar of data in the history. Override this method to implement your model's trading logic. You are passed the current index into the historical data in the idx parameter.

Model Name
Larry Connors VXX Trend Following

You can use Markdown syntax in your description.

Stolen from Larry Connors Book "Buy The Fear, Sell The Greed – 7 Behavioral Quant Strategies for Traders". Here's a short description:

With VXX the goal is to get short at the proper time, climb aboard as it declines, and stay aboard as long as possible. We also want to exit early if there’s a change in trend because if there is we can safely be in cash. How do we do this? It’s fairly simple: with moving average crossovers. A moving average crossover simply takes two different period moving averages. When the shorter period crosses below the longer period moving average, you go short VXX. When it crosses above its longer-term moving average you exit and go into cash.

The rules are simple for the VXX Trend Strategy and the test results are solid, especially for a trend-following methodology.

  1. When the 10-period simple moving average (SMA) (we also tested an exponential moving average, EMA) crosses under its 30-period SMA, short VXX. (If you use the exponential moving average, short VXX when its 10-period EMA crosses under its 30-period EMA.)
  2. Stay short until the 10-period SMA (EMA) crosses above its 30-period SMA (EMA).

I have extend the System with a 15% Stop-Loss. Instead of shortening VXX, you can also go Long on SVXY or ZIV. I prefer VXX because the ETF has enough liquidity.

Discussions about this Model
This Model has a discussion going with 4 post(s).
Your Models

You will need to Sign In in order to save your Models.

When saving a Model, provide a short and descriptive name that summarizes its spirit.

Also, provide a brief description that explains the logic of your Model, and any other interesting background material you'd like to include.

When you're ready, please Publish your Model so other members of the Quantacula community can review and learn from it.

Remember, in the free membership, you can save only 3 non-published Models. Publish a Model to open up one of your free Model slots. Premium members can save an unlimited number of private Models.

Data Selection
Select this option to backtest the Model on a single symbol.
Select this option to backtest the Model on a portfilio of symbols. Quantacula organizes groups of symbols into Universes.

This dynamic Universe eliminates the risk of Survivorship Bias
Upgrade to a premium membership to create your own custom Universes

Benchmark Symbol
The benchmark symbol is used to compare your backtest results against the overall market. Typically a market index symbol such as SPY or QQQ is used.

Data Scale
Backtest Settings

Starting Capital
Margin Factor
Max Open Positions
Position Sizing
% of equity
Date Range
Settings Tips

The settings here control what data is used when you backtest your Model, as well as the position sizing. Settings information is saved when you save your Model.


Equity Curve

Performance Metrics
Summary Model Benchmark
Profit %
Sharpe Ratio
Sortino Ratio
Alpha α N/A
Beta β N/A
Profit Factor
Recovery Factor
Drawdown Model Benchmark
Maximum Drawdown
Maximum Drawdown %
Maximum Drawdown Date
Interest and Commission Model Benchmark
Commission Paid
Cash Interest Earned
Margin Interest Paid
Positions Model Benchmark
Number of Positions
Number of NSF Positions (not taken)
Win Rate
Average Profit
Average Profit %
Average Hold Time (Bars)
Winning Positions Model Benchmark
Number of Winners
Winning %
Winners Avg Profit
Winners Avg Profit %
Winners Avg Hold Time (Bars)
Losing Positions Model Benchmark
Number of Losers
Losing %
Losers Avg Loss
Losers Avg Loss %
Losers Avg Hold Time (Bars)

Monthly Performance
Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec YTD
Open Positions
Position Symbol Quantity Entry Date Entry Price Last Price Profit Profit %

Closed Positions
Position Symbol Quantity Entry Date Entry Price Exit Date Exit Price Profit Profit %
Trade Signals
In order to view next day Trade Signals, please upgrade to a Quantacula Premium Account.
Contains debug string output using the WriteToDebugLog method in C#-Coded Models.