#twitter-follow { border: 0;position: fixed; top: 240px; left:0;} #live-support { border: 0;position: fixed; top: 370px; left:0;} #knowledge-base { border: 0;position: fixed; top: 170px; left:0;}

## Annual Return of a Security

by bug man, 3375 days ago

The Annual Return function calculates the trailing annual return of a security. This means that for each bar, the function returns the annual return based on its previous data.
The calculation starts after the first 50 bars. This is because for first bars, annual return time-series would be very volatile.

To scan stocks and detect the ones that have an annual return higher than 20% (based on all stock's data), create a new screen and type the following formula:

a = annualreturn();
filter = a > 20;

Another example: Scan stocks whose annual return is higher than 30% and Sharpe ratio above 1
Filter = annualreturn() > 60 and sharpe(close, -1) > 1;
// Period for Sharpe ratio is set to "-1" to instruct QuantShare to calculate that measure based on all previous bars.

Note that the compound annual return is calculated by this function

What is this?

 Type: Trading Indicator Object ID: 1509 Country: All Market: All Style: Technical Analysis

Related objects
Show All
No notes
 9
Candle Pattern Forecast (by Kyra Packens, uploaded several months ago)
No notes
 51
Derivatives: Number of days until the expiration date (by QuantShare, uploaded several months ago)
No notes
 15
Ticker Symbol Index (by QuantShare, uploaded several months ago)
No notes
 33
Set Global Variable (by QuantShare, uploaded several months ago)
No notes
 26
Avgerage Correlation (by Vangelis M., uploaded several months ago)
No notes
 21
Sum of a Custom Database's Field (by QuantShare, uploaded several months ago)
No notes
 20
Number of reviews
Average rate
Click to rate this item
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

 Random Blog Posts How to Backtest a Strategy from a Chart How to Reference Drawing Studies in QS Formulas Let QuantShare Manage your List of Securities The Ultimate Guide to Create Trading Systems in QuantShare QuantShare New Website Feature: Groups QuantShare Trading Software: New Features in the 3.1.2 Version Create Your Own Technical Stock Rating System Speed Up Optimizations by Saving Ranking Data into a Custom Database Show All

Number of reviews
Average rate
Click to rate this item
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