Sortina Ratio

Share:

Description

Computes Sortino ratio of a portfolio.

Usage

1
sortino_ratio(asset, thresholdReturn)

Arguments

asset

Portfolio or Position object created using portfolio_create( ) or position_add( ) function

thresholdReturn

Return value to be used as a cut-off point

Value

Metric object

Note

https://www.portfolioeffect.com/docs/glossary/measures/absolute-risk-adjusted-measures/sortino-ratio

Author(s)

Kostin Andrey <andrey.kostin@portfolioeffect.com>

See Also

sharpe_ratio calmar_ratio omega_ratio

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Not run: 
data(aapl.data) 
data(goog.data) 
data(spy.data) 
portfolio=portfolio_create(priceDataIx=spy.data)
portfolio_settings(portfolio,windowLength = '3600s',resultsSamplingInterval='60s')
positionGOOG=position_add(portfolio,'GOOG',100,priceData=goog.data)   
positionAAPL=position_add(portfolio,'AAPL',300,priceData=aapl.data) 
result=compute(sortino_ratio(portfolio,0.05),sortino_ratio(positionGOOG,0.05),
sortino_ratio(positionAAPL,0.05)) 
plot(sortino_ratio(portfolio,0.05),sortino_ratio(positionGOOG,0.05),
sortino_ratio(positionAAPL,0.05),legend=c('Portfolio','GOOG','AAPL'),title='Sortina Ratio')

dateStart = "2014-11-17 09:30:00"
dateEnd = "2014-11-17 16:00:00"
portfolio=portfolio_create(dateStart,dateEnd)
portfolio_settings(portfolio,portfolioMetricsMode="price",windowLength = '3600s',
resultsSamplingInterval='60s')
positionAAPL=position_add(portfolio,'AAPL',100)
positionC=position_add(portfolio,'C',300) 
positionGOOG=position_add(portfolio,'GOOG',150) 
result=compute(sortino_ratio(positionC,0.05),sortino_ratio(positionGOOG,0.05),
sortino_ratio(positionAAPL,0.05)) 
plot(sortino_ratio(positionC,0.05),sortino_ratio(positionGOOG,0.05),
sortino_ratio(positionAAPL,0.05),legend=c('C','GOOG','AAPL'),title='Sortina Ratio')

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.