Forecast Apply

Share:

Description

Runs forecasting algorithm on a configured forecast object.

Usage

1
forecast_apply(forecast)

Arguments

forecast

Object of type forecast created using forecast_builder( ) method

Value

Forecast object

Author(s)

Kostin Andrey <andrey.kostin@portfolioeffect.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
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 = '360s',
                   resultsSamplingInterval='60s')
positionAAPL=position_add(portfolio,'AAPL',100)
positionC=position_add(portfolio,'C',300) 
positionGOOG=position_add(portfolio,'GOOG',150) 

forecastVariance_1=forecast_builder(variance(positionAAPL))
# plot(forecast_apply(forecastVariance),variance(positionAAPL),legend=c('Forecast','Simple'))

forecastVariance_2=forecast_builder(variance(positionAAPL),window="1d")
plot(forecast_apply(forecastVariance_1),forecast_apply(forecastVariance_2),
     variance(positionAAPL),legend=c('Forecast,window=20d','Forecast,window=1d','Simple'))

## End(Not run)

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