Your interactive trading laboratory!
 • 
3 users online

Model - Modified 17 Liner
Created by Q Robert on 9/27/2018
, last modified on 9/27/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
Modified 17 Liner

Description
You can use Markdown syntax in your description.

17-liner modified to take only 1 position per bar. 3% sizes, no more than 4 positions per stock. 1 position per day, 10% stop loss (closing basis), and no new positions on a day that a position is sold.


Discussions
Attachment

Submit your Post
Cancel

What was the thought process behind these changes, Robert?

What was the thought process behind these changes, Robert?

Keep up the good work!

Keep up the good work!

Whats the exit rule in plain English?

Whats the exit rule in plain English?

The original 17-liner can put a significant percentage of your equity at risk in the same instrument on a single day if something tanks big. The idea is to limit risk by diversification and not to have more than 12% of your portfolio in one stock.

The original 17-liner can put a significant percentage of your equity at risk in the same instrument on a single day if something tanks big. The idea is to limit risk by diversification and not to have more than 12% of your portfolio in one stock.

Exit when the 2-period Lowest of the 1-period Rate of Change of the Closing price is greater than zero. It's probably easier to understand if you see the graph. See attached. The black plot is the ROC(Close,1) and the red line is the 2-period low of that.

Exit when the 2-period Lowest of the 1-period Rate of Change of the Closing price is greater than zero. It's probably easier to understand if you see the graph. See attached. The black plot is the ROC(Close,1) and the red line is the 2-period low of that.

Submit Changes
Cancel
Delete Post
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.

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

Backtest

Equity Curve

Performance Metrics
Summary Model Benchmark
Profit
Profit %
APR
Sharpe Ratio
Sortino Ratio
Exposure
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.
Symbol: