Description Usage Arguments Author(s) Examples
Generic function of plot method for fitTimeSeriesFactorModel. Either plot all assets or choose a single asset to plot.
1 2 3 4 5 6 7 | ## S3 method for class 'TimeSeriesFactorModel'
plot(x,
colorset = c(1:12), legend.loc = NULL,
which.plot = c("none", "1L", "2L", "3L", "4L", "5L", "6L", "7L"),
max.show = 6, plot.single = FALSE, asset.name,
which.plot.single = c("none", "1L", "2L", "3L", "4L", "5L", "6L", "7L", "8L", "9L", "10L", "11L", "12L", "13L"),
VaR.method = "historical")
|
x |
fit object created by
|
colorset |
Defualt colorset the same as
|
legend.loc |
Plot legend or not. Defualt is
|
which.plot |
Integer indicates which plot to create:
"none" will create a menu to choose. Defualt is none. |
max.show |
Maximum assets to plot. Default is 6. |
plot.single |
Plot a single asset of lm class.
Defualt is |
asset.name |
Name of the asset to be plotted. |
which.plot.single |
Integer indicates which plot to
create: "none" will create a menu to choose. Defualt is
none. |
VaR.method |
Character, method for computing VaR.
Valid choices are either
"modified","gaussian","historical", "kernel". computation
is done with the |
Eric Zivot and Yi-An Chen.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
# load data from the database
data(managers.df)
fit.macro <- fitTimeseriesFactorModel(assets.names=colnames(managers.df[,(1:6)]),
factors.names=c("EDHEC.LS.EQ","SP500.TR"),
data=managers.df,fit.method="OLS")
# plot of all assets and show only first 4 assets.
plot(fit.macro,max.show=4)
# single plot of HAM1 asset
plot(fit.macro, plot.single=TRUE, asset.name="HAM1")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.