Skip to content

Instantly share code, notes, and snippets.

@stena
stena / 0_reuse_code.js
Created December 31, 2013 15:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

rCharts + dimplejs Visualization of bfast on S&P 500

Interactively analyze the effect of h on the R package bfast breakpoints with a d3.js visualization using rCharts.

Code to replicate and more

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)