Line plot of portfolio metric (for a time series)

Description

Draws a new line plot using a time series of metric values.

Usage

1
2
3
4
5
6
7
8
9
util_plot2d(metric,
title=NULL,
subtitle=NULL,
font_size=10,
line_size=1.2,
bw=FALSE,
legend="",
axis.text.size=1.5,
title.size=2)

Arguments

metric

Time series of (time, value) returned by metric functions.

title

Plot title.

subtitle

Plot subtitle.

font_size

Baseline font size.

line_size

Line thickness.

bw

Black and white color scheme flag.

legend

Plot legend.

axis.text.size

Axis font size.

title.size

Title font size.

Value

plot

Author(s)

Kostin Andrey <andrey.kostin@portfolioeffect.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
data(aapl.data) 
data(goog.data) 
data(spy.data) 
portfolio=portfolio_create(priceDataIx=spy.data)
portfolio_settings(portfolio,portfolioMetricsMode="price",windowLength = '3600s')
positionGOOG=position_add(portfolio,'GOOG',100,priceData=goog.data)   
positionAAPL=position_add(portfolio,'AAPL',300,priceData=aapl.data) 
util_plot2d(compute(log_return(portfolio))[[1]],title="Portfolio return")

## End(Not run)

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