This is a trading item or a component that was created using QuantShare by one of our members.
This item can be downloaded and used by QuantShare Trading Software.
Trading items are of different types. There are data downloaders, trading indicators, trading systems, watchlists, composites/indices...
You can use this item and hundreds of others for free by downloading QuantShare.
Top Reasons Why You Should Use QuantShare:
Works with US and international markets (stock, forex, options, futures, ETF...)
Offers you the tools that will help you become a profitable trader
Allows you to implement any trading ideas
Exchange items and ideas with other QuantShare users
Our support team is very responsive and will answer any of your questions
We will implement any features you suggest
Very low price and much more features than the majority of other trading software
This is an enhancement from the "System Metrics" MM script. This version has many calculation bug fixes and adds the following:
Four inputs:
1) # Tr Rolling R - the number of trades to use in rolling R/SQN calculation
2) Include Dividends - flag to indicate whether to include dividends in calculations (requires custom database with dividend entries: item http://www.quantshare.com/sa-37-how-to-download-the-history-of-dividend-payments-for-stocks-in-the-us-market)
3) ATR Lookback - ATR lookback at time of trade entry; used for volatility based position sizing
4) Avg Loss Estimate% - when the system has no stop, estimate of average loss based on historical data/testing, used for calculating R. THis does nothing if the system has an initial stop loss
5) # of bars to use in pre/post trade exit/entry efficiency - a value of zero means to use the same number of bars as the duration of the trade
Simulation Metrics:
Compounded Reinvested Dividend Value
Ending Account Value including Dividends
Max Drawdown% w/dividends
CAR w/dividends
Estimated Avg. Loss = 1.1%. Act. Avg. Loss% - when the system has no stop, user estimates avg loss, this metrics shows the delta
Standard Deviation of (R)
Max Drawdown (R)
Average Exit Efficency (winning trades only) - as defined by Chuck Lebeau: exit timing wrt post-trade timeframe
Average Entry Efficency (winning trades only) - entry timing wrt pre-trade timeframe
Average Winning Trade Efficency - combines Avg Exit Efficiency and Avg Exntry Efficiency (how much of the market move did the trade catch)
Average Losing Trade Efficency - combines Avg Exit Efficiency and Avg Exntry Eficiency (how much of the market move did the trade catch)
Winning Trade Ideal Entry Bars from Act. Entry - ideal entry point in relation to actual entry (-1 means the bar before entry)
Winning Trade Ideal Exit Bars from Act. Exit - ideal exit point in relation to actual exit (-1 means the bar before exit)
Losing Trade Ideal Entry Bars from Act. Entry
Losing Trade Ideal Exit Bars from Act. Exit
Per Trade Metrics
MFE%BT - MFE as if trade had been active in pre-trade timeframe
MAE%BT - MAE as if trade had been active in pre-trade timeframe
MFE%AT - MFE as if trade had been active in post-trade timeframe
MAE%AT - MAE as if trade had been active in post-trade timeframe
Exit Efficiency
Entry Efficiency
Trade Efficiency
IExit BFEx - Ideal Exit Bars From Exit
IEntry BFE - Ideal Entry Bars From Entry
MFEV - Market price of MFE
MAEV - Market price of MAE
MFE BFE - Bars from entry where MFE occured
MAE BFE - Bars from entry where MAE occured
MFEVBT - Market price of MFE as if trade was active in the pre-trade timeframe
MAEVBT - Market price of MAE as if trade was active in the pre-trade timeframe
MFEBT BFE - Bars from entry in pre-trade timeframe where MFE occured (always negative number)
MAEBT BFE - Bars from entry in pre-trade timeframe where MAE occured (always negative number)
MFEVAT- Market price of MFE as if trade was active in the post-trade timeframe
MAEVAT- Market price of MAE as if trade was active in the post-trade timeframe
MFEAT BFEx - Bars from exit in post-trade timeframe where MFE occured (always positive number)
MAEAT BFEx - Bars from exit in post-trade timeframe where MFE occured (always positive number)
Time Period Metrics
Account Equity w/dividends
R-Mult
Total R
Run Avg R
n Tr Avg R
n Tr SQN
Drawdown (R)
Exit Efficiency
Entry Efficiency
Trade Efficiency
Ideal Entry bars from Entry
Ideal Exit bars from Exit
Run Avg Exit Efcy
Run Avg Entry Efcy
Run Avg Winner Trade Efcy
Run Avg Loser Trade Efcy
Run Avg Winner Ideal Entry bars from Entry
Run Avg Loser Ideal Entry bars from Entry
Run Avg Winner Ideal Exit bars from Exit
Run Avg Loser Ideal Exit bars from Exit
From the original version: This MM script adds many system statistics and per trade metrics to help compare trading systems. Most of the calculations are done in terms of R (defiend as initial risk).
Trade Statistics:
Total R - P/L in terms of R
Expectancy (R)
SQN (n) - System Quality Number = expectancy(R)/stdev(R) * sqrt(num trades)
SQN100 - SQN normalized to 100 trades
T-score of returns - avg(perf)/stdev(perf) * sqrt(num trades)
Average Win (R)
Average Loss (R)
Largest Win (R)
Largest Loss (R)
Average Win MAE (R)
Average Loss MAE (R)
Largest Win MAE (R)
Largest Loss MAE (R)
Average Win MFE (R)
Average Loss MFE (R)
Largest Win MFE (R)
Largest Loss MFE (R)
Profit Factor (R)
Performance Ratio (R)
Payoff Ratio (R)
Largest Win (R) / Total R
Longest # bars between new equity highs
Longest # trades between new equity highs
Average # bars between new equity highs
Average # trades between new equity highs
% trades making new equity highs
% bars making new equity highs
Equity Curve R-Squared
R per Day
Daily SQN - SQN calculated using # of average closed trades per day
Opportunity (Day)
Expectunity (R) (Day)
Percent Inactive Days - number of days without closed trades
SQN (n) of Daily P/L (n = number of days in backtest)
SQN100 of Daily P/L
R per Week
Weekly SQN - SQN calculated using # of average closed trades per week
Opportunity (Week)
Expectunity (R) (Week)
Percent Inactive Weeks - number of weeks without closed trades
SQN (n) of Weekly P/L (n = number of weeks in backtest)
SQN100 of Weekly P/L
R per Month
Monthly SQN - SQN calculated using # of average closed trades per month
Opportunity (Month)
Expectunity (R) (Month)
Percent Inactive Months - number of days without closed trades
SQN (n) of Monthly P/L (n = number of months in backtest)
SQN100 of Monthly P/L
R per Year
Yearly SQN - SQN calculated using # of average closed trades per day
Opportunity (Year)
Expectunity (R) (Year)
Percent Inactive Years - number of days without closed trades
SQN (n) of Yearly P/L (n = number of months in backtest)
SQN100 of Yearly P/L
Per trade Metrics:
Margin% - % of account margin used
Entry Price - entry price of position
Exit Price - exit price of position
Risk - $ amount risked per trade
Risk% - %risked of total account per trade
R-Mult - trade P/L in terms of initial risk
MAE (R) - MAE in terms of R
MFE (R) - MFE in terms of R
n Tr Avg R - rolling average R for the last n trades (n is user defined)
n Tr SQN - rolling SQN for the last n trades (n is user defined)
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.