Click here to Login








Holding period return - classifying positions

by The trader, 5620 days ago
Share |






This item creates three metrics when analyzing a list of trading rules.
The object classify trading rules output or return into three categories.
The categories are:
Position whose holding period is below 10 bars
Position whose holding period is below 40 bars
Position whose holding period is above 40 bars

Of course these thresholds can be modified.
To do so, just update the two variables: threshold_1 and threshold_2.

As you may have noticed this item is of no use when using an N-Bars stop, because with this kind of stop the holding period is already known.
If you choose for example a trailing stop as positions exit, you will get three metrics where the first one will calculate the average output value for the positions where the holding period is below or equal to 10...

How it works: (Holding period return)
The object skims through all the generated positions and performs a test on each one.
It gets the number of bars value (NbBars) and compares it to the thresholds, then adds it to the appropriate variable (sum1, sum2 or sum3).
The sum1 contains the sum of all outputs, while count1 contains the sum of all holding periods.
The item then divides 'sum1' by 'count1' and creates the metric using the 'Functions.AddMetric' function.


Share This ->
Share |


You have to log in to bookmark this object
What is this?




Type: Rule Metrics

Object ID: 110


Country:
All

Market: All

Style:
Technical Analysis

Reviews
You must log in first

Join now
and get instant access for free to the trading software, the Sharing server and the Social network website.
Click here


Related objects

Empty

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object

Technical Analysis


Fundamental Analysis



Random Blog Posts

10 ways to download historical stock quotes data for free

True portfolio simulation applied to trading systems

Optimization of trading rules

Volatility and trading systems

Trading Optimization

Automatically create historical quotes charts

How to download the history of dividend payments for stocks in the US market

Same chart, different symbols

Show All

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object






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 © 2024 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.