Join Now or Login or connect with

Trading Software Trading objects Features Blog Search

Drawdown: Long and Short

by bug man, 378 days ago
Share |

The drawdown measures the decline of a time-series from an historical peak; generally the drawdown is used to analyze portfolio equities.
The maximum drawdown will then let you know how much money a portfolio has lost (or the maximum portfolio value decline) during the investing/backtesting period and therefore the drawdown is a measure of the risk of a financial investment.
This drawdown measure is very important and is the basis of many other financial risk measures.

The drawdown can also be used for normal time-series or security quotes.
This function is an extension of the already available drawdown function. The function that exists in QuantShare let you calculate the drawdown of a time-series. But what the QuantShare drawdown formula doesn't calculate is the drawdown of a security if we are short the asset.

This function has two calculation modes: a long mode and a short mode.
In a short mode, the formula calculates the drawdown of the time-series as if we were short this time-series security; the more the time-series raise the more the drawdown increase (since the calculated values are negative the drawdown values will, in fact, decrease); and the opposite for the long mode.
Note that the drawdown calculation starts from the first quote.

The function name is 'drawdown_adv', it accept only one parameter; this parameters will let you decide whether to calculate in long or short mode.
Set the parameter value to 1 for a long mode, otherwise the short mode will be used.

The formula isn't complicated; it is about 30 lines of code. It starts by getting the close price of the asset, then loop through the time-series data elements while keeping track of the highest close values (long mode) or lowest close values (short mode).


Share This ->
Share |


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





Related Trading Objects



Country
Page 1
Wilder Volatility Index - Average True ..
by Brian Brown, uploaded one month ago
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 4 Notes Report an item
Wilder Volatility Index - Average True ..
by Brian Brown, uploaded one month ago
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 1 Notes Report an item
Geometric Moving Average Indicator
by Brian Brown, uploaded one month ago
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 0 Notes Report an item
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






Market
Page 1
Fibonacci Trading Indicator - Support a..
by QuantShare, uploaded today
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 0 Notes Report an item
Fibonacci Trading with the Retracement ..
by QuantShare, uploaded yesterday
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 0 Notes Report an item
Williams AD - Accumulation Distribution..
by QuantShare, uploaded one week ago
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 1 Notes Report an item
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






Style
Page 1
Fibonacci Trading Indicator - Support a..
by QuantShare, uploaded today
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 0 Notes Report an item
Fibonacci Trading with the Retracement ..
by QuantShare, uploaded yesterday
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 0 Notes Report an item
Williams AD - Accumulation Distribution..
by QuantShare, uploaded one week ago
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 1 Notes Report an item
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






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
Show All
Buy Indicator (by bug man, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 56 Notes Report an item
Indicator -> Moving average -> Rate of change -> Trading rule (by bug man, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 26 Notes Report an item
Simple pattern detection rules using close and open prices (by bug man, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 39 Notes Report an item
DeMark DeMarker trading rules (by bug man, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 22 Notes Report an item
Technical indicators time series (by The trader, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 17 Notes Report an item
Fibonacci retracement: Golden ratio (by bug man, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 25 Notes Report an item
Chaikin Money Flow Indicator (by bug man, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 11 Notes Report an item
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 Objects

  4 0 0 - Accumulation Swing Index
  7 0 0 - Lisbon Stock Exchange
 21 0 0 - Breakaway Gaps
  3 0 0 - Advance Stocks & Volume - Stock that advanced with a volume increase
 14 0 0 - Valuation ratios for US stocks
  2 0 0 - Historical Stock Quotes Data for more than 50 Exchanges
  6 0 0 - Media sentiment alerts
  9 0 0 - Italian stock market
 11 0 0 - SMA - ROC mask
  5 0 0 - Covered Put Screener
More trading objects...


Recent Posts

Pivot Tables in QuantShare Trading Software
Posted 9 days ago

How to create market indicators using the composite function - Part 1
Posted 17 days ago

Optimize a trading strategy using the Sharpe ratio
Posted 24 days ago

How to create a trading indicator that uses stock news
Posted 31 days ago

How to create your own technical analysis indicators
Posted 38 days ago

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


contactus
About | Privacy | Terms of Use | Manual
Copyright © 2010 QUANTSHARE.COM