Description Usage Arguments Value Note
method to generate a pnl curve from a running position. bids, asks and running position must have the same length. Can compute the pnl from one price to the other, but only for one asset! Does not take time into account - if you need signal delays, lag all input data on your own.
1 | generatePnlCurve(bidPrices, askPrices, runningPosition, messages = FALSE)
|
bidPrices |
an array of bid prices |
askPrices |
an array of ask prices |
runningPosition |
an array that contains a vector of the position |
messages |
specifies whether you want to have debug messages or not, defaults to FALSE |
This function returns a plain double array with pnl changes (uncumulated) and not an XTS series.
all input arrays must have the same length.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.