-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathplot.iStarEst.Rd
87 lines (72 loc) · 3.61 KB
/
plot.iStarEst.Rd
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iStar.R
\name{plot.iStarEst}
\alias{plot.iStarEst}
\title{Plot method for object of type \code{iStarEst}}
\usage{
\method{plot}{iStarEst}(x, xVar, fixVars, fixVals, params, multiple = FALSE, ...)
}
\arguments{
\item{x}{An object of class \code{iStarEst}, from \code{iStarPostTrade}. See 'Details'}
\item{xVar}{A character specifying the variable to plot the market impact against, one of 'Size' (default), 'POV' or 'AnnualVol'}
\item{fixVars}{A vector of character specifying the variable to fix. A couple of 'Size', 'POV' (default) or 'AnnualVol' (default)}
\item{fixVals}{A vector with named elements representing the values to fix \code{fixVars} at, in decimal units}
\item{params}{A vector with named elements being 'a_1:4' and 'b_1', the parameters to compute the market impact with. See 'Details'}
\item{multiple}{A boolean indicating whether or not to plot a single cost curve or multiple cost curves.}
\item{...}{Any other passthrough parameter}
}
\value{
In the produced plot, the chosen \code{xVar} and \code{fixVars} are expressed
in percentages terms, as they are most commonly used in reports.
}
\description{
The plots are mainly provided for exaplanatory purposes. They are a qualitatite
mean to extend an order scrutiny to the market impact estimated cost shape under
different values of the relevant variables and of the model parameters.
Cost curves are expected to possess a concave shape.
}
\details{
The main scope of present function is to reproduce what Kissell refers to as
\emph{cost curves}. In these curves estimated market impact is plotted against
the order size for a given value of the volatility or against the volatility
for a given order size. Likewise, we can plot the estimated market impact against
sequences of 'POV' or 'AnnualVol' with the other two respective variables being
fixed.
It shall be stressed that cost curves refers to ideal circumstances where the
market impact is computed varying the selected variable along a given sequence
(while keeping fixed the other two variables at their provided values) and using
parameters of interest (whether estimated or not).
When the \code{x} object passed comes for , there is no need to explicitly
pass the estimated parameters. Whereas if \code{iStarPostTrade} was simply
used to obtain the I-Star model impact estimates with provided parameters then
- although the rusulting \code{x} object is of class \code{iStarEst} - one needs
to explicitly pass parameters to the plotting method as well, via \code{params}.
Furthrmore, for consistency it should be noted that \code{params} must be within
their respective bounds, provided by the author and reported in \code{iStarPostTrade}
documentation.
}
\examples{
# Assuming you have previously run iStarPostTrade() to estimate model parameters and
# assigned to iStarEst. Alternatively you can specify your own model parameters with
# the params argument.
\dontrun{
# Single Cost Curve
plot(iStarEst, fixVals = c('POV'=0.1, 'AnnualVol'=0.25))
# Multiple Cost Curves
plot(iStarEst, fixVals = c('POV'=c(0.1,0.2,0.3,0.4,0.5), 'AnnualVol'=0.25), multiple = TRUE)
# Assuming user would like to specify their own params. Example uses params for
Scenario 'All Data' from Table 5.4 in Kissell2014
plot(iStarEst, fixVals = c('POV'=c(0.1,0.2,0.3,0.4,0.5), 'AnnualVol'=0.25),
params = c(a_1 = 708, a_2=0.55, a_3=0.71, a_4=0.5, b_1=0.98),
multiple = TRUE)
} #end dontrun
}
\references{
\emph{The Science of Algorithmic Trading and Portfolio Management} (Kissell, 2013), Elsevier Science.
}
\seealso{
\code{\link{iStarPostTrade}}
}
\author{
Vito Lestingi
}