Description Usage Arguments Examples
a function which can help you transform your forward sampling xts to data.frame
1 2 | doSeriesOfSimulateStopLimitPrices(longFswXtDf, limitRatioSeq = seq(0.01, 0.1,
0.01), stopRatioSeq = seq(0.01, 0.1, 0.01), NonHitIdxValue = 1e+06)
|
longFswXtDf |
a forward sampling xts with long format |
limitRatioSeq |
series of limit return ratio |
stopRatioSeq |
series of stop return ratio |
NonHitIdxValue |
when the price not hit stop or limit, assign this value |
1 2 | Xt = getSymbols('2330.TW', auto.assign = F)
Xt %>% Pt2Rt %>% ForwardSlidingWindow(20) %>% FswXt2Df(index(Xt)[c(1,3,5,7,9)],longFormat=T) %>% simulateStopLimitPrices(0.06,0.06) %>% head
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.