Interactively analyze the effect of h on the R package bfast breakpoints with a d3.js visualization using rCharts.
Original R bfast code from blog post
For a better understanding of bfast please see the following paper.
| ############################################################ | |
| ## Using Genetic Algorithms in Quantitative Trading | |
| ## | |
| ## thertrader@gmail.com - Mar 2014 | |
| ############################################################ | |
| library(PerformanceAnalytics) | |
| library(rgenoud) | |
| library(quantmod) | |
| library(TTR) |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| # -*- coding: cp1252 -*- | |
| # Minimize a continuous differentialble multivariate function. Starting point | |
| # is given by "X" (D by 1), and the function named in the string "f", must | |
| # return a function value and a vector of partial derivatives. The Polack- | |
| # Ribiere flavour of conjugate gradients is used to compute search directions, | |
| # and a line search using quadratic and cubic polynomial approximations and the | |
| # Wolfe-Powell stopping criteria is used together with the slope ratio method | |
| # for guessing initial step sizes. Additionally a bunch of checks are made to | |
| # make sure that exploration is taking place and that extrapolation will not |