alpha_jensens: Jensen's Alpha

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Computes portfolio Jensen's alpha (excess return) according to the Single Index Model.

Usage

1

Arguments

asset

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

Value

Metric object

Note

https://www.portfolioeffect.com/docs/glossary/measures/relative-risk-adjusted-measures/jensens-alpha

Author(s)

Kostin Andrey <[email protected]>

See Also

beta

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
## Not run: 
data(aapl.data) 
data(goog.data) 
data(spy.data) 
portfolio=portfolio_create(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(alpha_jensens(portfolio),alpha_jensens(positionGOOG),alpha_jensens(positionAAPL)) 
plot(alpha_jensens(portfolio),alpha_jensens(positionGOOG),alpha_jensens(positionAAPL),
legend=c('Portfolio','GOOG','AAPL'),title="Jensen's Alpha")

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(alpha_jensens(positionC),alpha_jensens(positionGOOG),alpha_jensens(positionAAPL)) 
plot(alpha_jensens(positionC),alpha_jensens(positionGOOG),alpha_jensens(positionAAPL),
legend=c('C','GOOG','AAPL'),title="Jensen's Alpha")

## End(Not run)

PortfolioEffectHFT documentation built on May 30, 2017, 3:08 a.m.