Skip to content

Instantly share code, notes, and snippets.

View parthasen's full-sized avatar

Partha Sen parthasen

  • India
View GitHub Profile
@parthasen
parthasen / superchartFOUR.afl
Created April 11, 2016 04:35
regression AR OLS
_SECTION_BEGIN("Regression Prediction");
//------------------------------------------------------------------------------
//
// Formula Name: AR_Prediction.afl
// Author/Uploader: Mich. - tom_borgo [at] hotmail.com
// E-mail:
// Date/Time Added: 2006-11-18 20:09:10
// Origin:
// Keywords: ar,prediction,cycle,fft,spectrum,regression,burg
// Level: basic
AFL CODE FOR TRADING (VERSION: V7)
**********
_SECTION_BEGIN("TRADE");
Filename = _DEFAULT_NAME();
SubmitOrders = True;
Tracing = False;
MarketON=093000; TradeON = 094000; TradeOFF =153000; MarketOFF=160000; LM=155500;
US_ON = TimeNum() >= 093000 AND TimeNum() <=160000;
US_OFF = TimeNum() > 160000 ;//day's over*/
US_Trade_On=TimeNum() >= 094000 AND TimeNum() <=153000;
#!/usr/bin/env python
class BidAskParseError(Exception): pass
import datetime
from twisted.internet import reactor
from twisted.protocols.basic import LineReceiver
from twisted.internet.protocol import ClientFactory
class ExampleClient(LineReceiver):
@parthasen
parthasen / garchAuto.R
Last active June 15, 2016 12:49 — forked from ivannp/garchAuto.R
garchAutoTryFit = function(
ll,
data,
trace=FALSE,
forecast.length=1,
with.forecast=TRUE,
ic="AIC",
garch.model="garch" )
{
formula = as.formula( paste( sep="",
R_LIBS_USER="~/R"