Skip to content

Instantly share code, notes, and snippets.

View vfulco's full-sized avatar

Vincent C Fulco vfulco

  • Weisisheng Corporate Management Consulting (Shanghai) Ltd.
  • Shanghai, China
View GitHub Profile
@milktrader
milktrader / doji.jl
Created February 9, 2014 14:17
what days were doji days in SPX from 1950 - 2013
julia> using TimeSeries, MarketTechnicals, MarketData, Lazy
julia> @> OHLC doji findall x->OHLC[x] x->x.timestamp
166-element Array{Date{ISOCalendar},1}:
1962-03-02
1962-04-13
1962-07-16
1962-10-08
1963-02-08
1963-05-22
@mbusigin
mbusigin / RV vs FV
Created October 12, 2014 18:11
Relating Future Volatility with Realized Volatility
getSymbols("^GSPC", from="1950-01-01")
p = 10
a = na.omit(merge( volatility(GSPC, n=p)*100, lag(volatility(GSPC, n=p), k=-p)*100 ))
names(a) = c("hv", "rv")
medianvalues = c()
meanvalues = c()
maxvalues = c()
minvalues = c()
keys = c()
for ( x in seq( 0, max(a$hv), 2 ) )
@vfulco
vfulco / llxc.R
Last active August 29, 2015 14:09 — forked from mbusigin/llxc.R
llxc = function( a, ll=-12:12, legend.loc="topleft", displayLegend=T, legend.cex=1.0, overplot=F )
{
if ( ncol(a) < 2 )
{
print( "Not enough columns")
return;
}
a = na.omit(a)
@vfulco
vfulco / InstallationStack.md
Last active September 22, 2015 03:57 — forked from pjnovas/InstallationStack.md
Complete Install on Ubuntu Server of Nodejs + MongoDB + NGINX

##Ubuntu Server

NodeJS

sudo apt-get install g++ curl libssl-dev apache2-utils git-core make
cd /usr/local/src
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
tar -xvzf node-v0.10.28.tar.gz
cd node-v0.10.28
anonymous
anonymous / bootstrap.sh
Created June 2, 2011 17:19
Django on Heroku with Celery and Sentry
virtualenv --no-site-packages .
source bin/activate
bin/pip install Django psycopg2 django-sentry
bin/pip freeze > requirements.txt
bin/django-admin.py startproject mysite
cat >.gitignore <<EOF
bin/
include/
lib/
EOF
@cspanring
cspanring / pagination.html
Created November 8, 2011 02:53
linaro django pagination template for Bootstrap framework
{# use in combination with https://github.com/zyga/django-pagination #}
{# and http://twitter.github.com/bootstrap/ #}
{# project-dir/templates/pagination/pagination.html #}
{% if is_paginated %}
{% load i18n %}
<div class="pagination">
<ul>
{% block previouslink %}
{% if page_obj.has_previous %}
@gladson
gladson / bootstrap-recaptcha.css
Created October 1, 2012 15:46 — forked from boh1996/bootstrap-recaptcha.css
Twitter Bootstrap reCAPTCHA
.input-recaptcha {
width:172px;
}
@jaredwoodard
jaredwoodard / CBOE_csv_to_xts
Created October 19, 2012 01:57
pulls csv files from the CBOE and converts them to xts
library("quantmod")
# we're pulling the Google VIX index (VXGOG) but this also works for VXAPL, VXGS etc.
# see http://www.cboe.com/micro/equityvix/introduction.aspx
url <- "http://www.cboe.com/publish/ScheduledTask/mktdata/datahouse/VXGOGDailyPrices.csv"
symb = read.csv(url,header=FALSE, stringsAsFactors=F)
symb <- symb[-1,]
colnames(symb) <- c(symb[1,])
symb <- symb[-1,]
@mauromarano
mauromarano / contact.php
Last active October 12, 2015 17:57
Una contact page con twitter bootstrap e recaptcha
<?php
/**
*
* Author: Mauro Marano
* eMail: http://www.mauromarano.it/contact.php
* Date: 13/11/2012
*
* Prima di iniziare
* =================
@flomotlik
flomotlik / Scaler.rb
Created November 15, 2012 15:25
Our scaling logic
if open_jobs < idle_workers.count
scaledown_workers
elsif all_workers_working? && jobs_queued? && (instances_count - workers.count) < open_jobs
scaleup_workers
end