This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################ | |
## Using Genetic Algorithms in Quantitative Trading | |
## | |
## thertrader@gmail.com - Mar 2014 | |
############################################################ | |
library(PerformanceAnalytics) | |
library(rgenoud) | |
library(quantmod) | |
library(TTR) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Yahoo Finance stock historical data, prices and details retrieval function written in Javascript, jQuery and YQL | |
v2013-08-05 | |
(c) 2013 by Fincluster ltd - http://fincluster.com <dev@fincluster.com> | |
*/ | |
(function($) { | |
function getStock(opts, type, complete) { | |
var defs = { | |
desc: false, | |
baseURL: 'http://query.yahooapis.com/v1/public/yql?q=', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Converts CSV to JSON | |
* Example uses Google Spreadsheet CSV feed | |
* csvToArray function I think I found on php.net | |
*/ | |
header('Content-type: application/json'); | |
// Set your CSV feed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup the environment | |
import numpy as np | |
import matplotlib.pyplot as plt | |
x = np.linspace(0, np.pi*4, 137) | |
y = (2*np.random.normal(size=137) + x**2) | |
# reflect everything around the origin | |
xx = np.hstack([-1*x[::-1], x]) | |
yy = np.hstack([-1*y[::-1], y]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#should have known R already has horizon plot functionality | |
#latticeExtra (already a favorite package of mine) has it sitting right there | |
#http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=latticeExtra:horizonplot | |
require(lattice) | |
require(latticeExtra) | |
require(reshape2) | |
require(quantmod) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Muscle Memory (Command-based) | |
Command + A (Select , Esc to exit) | |
Command + B (Run Build) | |
Command + C (Copy) | |
Command + D (Selects the word the cursor is on, Press it again to create another cursor on the next selection) | |
Command + F (Open Find Console) | |
Command + G (to jump/move cursor forward from one Search result to next) | |
Command + H (Hide Sublime Text) | |
Command + I (Incremental find) | |
Command + J (Join Line) |
NewerOlder