Run Channel in Rcpp
05 Mar 2015
To install Systematic Investor Toolbox (SIT) please visit About page.
Let’s continue with Run Quantile in Rcpp post and implement
another concept David Varadi discussed in the Conditional Percentile Channels
post.
Below is a Rcpp implementation of Conditional Percentile Channels
Please save above code in the channel.cpp
file or download channel.cpp.
Next let’s check for correctness and speed.
low |
high |
119.4906 |
214.0909 |
low |
high |
119.4906 |
214.0909 |
low |
high |
4.090909 |
119.4906 |
low |
high |
4.090909 |
119.4906 |
TRUE
|
expr |
min |
lq |
mean |
median |
uq |
max |
neval |
1 |
run_quantile_weightR(x, n, low.prob, high.prob) |
10,911 |
11,001 |
11,657 |
11,242 |
12,256 |
13,904 |
10 |
2 |
run_quantile_weight(x, n, low.prob, high.prob) |
99 |
100 |
111 |
104 |
121 |
140 |
10 |
To be continued.
(this report was produced on: 2015-03-07)