This is fast enough to use on a 5-second chart. No-loop calculation of VWAP and standard deviation, from Head2K at traderslaboratory:
ND = Day() != Ref(Day(), -1);
P = (H + L) / 2;
VWP = P * V;
BI = BarIndex();
BeginBI = ValueWhen(ND, BI);
BeginBI = BeginBI[BarCount -1];
if ( BeginBI < BarCount -1 )
{
Inrange = BI >= BeginBI;
CumV = Cum(V * InRange);
CumVWP = Cum(VWP * InRange);
VWAP = CumVWP / CumV;
S = Cum(Ref(CumV, -1) * V * (P - Ref(VWAP, -1))^2 / CumV);
Variance = S / CumV;
SD = sqrt(Variance);
VWAP = IIf(InRange, VWAP, Null);
Plot(VWAP, "VWAP", colorYellow, styleNoTitle );
Plot(VWAP + SD, "+1SD", colorGreen, styleDashed + styleNoTitle );
Plot(VWAP - SD, "-1SD", colorRed, styleDashed + styleNoTitle );
Plot(VWAP + 2*SD, "+2SD", colorSeaGreen, styleDashed + styleNoTitle );
Plot(VWAP - 2*SD, "-2SD", colorOrange, styleDashed + styleNoTitle );
}
Plot(Close, "C", colorGrey40, styleLine);
2009/12/04
2009/12/02
Trading System Development
- Long/Short Market Dynamics, Clive Corcoran, 2007
- Quantitative Trading Systems, Howard Bandy, 2007
- Quantitative Trading, Ernest Chan, 2009
- EliteTrader chats on scalping: e-mini * nasdaq
- Trading and Exchanges: Market Microstructure, Larry Harris, 2002
2009/02/13
Windows XP USB device installation problems
- Error messages and symptoms
- Found New Hardware Wizard
- "Cannot install this hardware"
- "Wizard cannot find the necessary software"
- Yellow exclamation icon next to devices in Device Manager
- Driver not found
- General troubleshooting
- Possible cause/solution (in order of increasing desperation)
- INF files corrupt or missing from c:\windows\inf
- Copy from another XP machine
- usb.inf
- usbport.inf
- usbprint.inf
- usbstor.inf
- usbvideo.inf
- INF cache corrupted
- Delete c:\windows\inf\infcache.1
- Scan for new hardware in device manager
- Windows will re-create the INF cache
- USB hub powered off
- Corrupt Config value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network
- Export/Import device registry settings
2009/02/06
Multi-Monitor Trading Workstation
2009/02/04
Windows Desktop Widget Utilities
- inspiration: display motivational quotes from text file
- day planner: 3-month calendar for goal tracking
- jc-sticky-deluxe: electronic post-it notes
- world clock pro: multiple time zones, day/night tracking
- stock quotes
- scuttlebutt: mini chart
- xrstockgain: portfolio gain/loss
- yahoo finance: stock watchlist
- install yahoo widgets
2009/01/16
2009/01/15
Interactive Brokers API
- IB
- API and sample code
- API Reference
- Yahoo Group TWSAPI
- IB Forum
- TWSStart
- TWSLink (middleware, API abstraction layer)
- ATS sample architecture
- TREE data server (real-time data capture)
- IB demo site
- Data feed quality
- Excel
- Python
- C#
- WinForms trading program (Ms-PL)
- IB C# API library
- Live data tutorial
- Tradelink ATS (open-source)
- TickZoom (backtesting)
- NMath
- Java
- Perl
- C++
- R
2009/01/12
General Trading Books
- General
- "High Probability Trading", Marcel Link
- "Trading for a Living", Alexander Elder
- Psychology
- "The Disciplined Trader", Mark Douglas
- "Trading in the Zone", Mark Douglas
- "Fooled by Randomness", Nassim Taleb
- Markets
- "Reminiscences of a Stock Operator", Edwin Lefevre
- "Market Wizards", Jack Schwager (1992)
- "New Market Wizards", Jack Schwager (2008)
- "The Stock Trader: How I Make a Living Trading Stocks", Tony Oz (2000)
- Trading Systems
- "Way of the Turtle", Curtis Faith (2007)
2009/01/10
Financial Time Series Analysis with R
- Libraries
- financial charting
- market data retrieval from Yahoo, Google, IB and others
- July 2008 presentation
- R-SIG-Finance query for "Quantmod"
- interface to Interactive Brokers TWS API
- R-SIG-Finance query for "IBrokers"
- Overview
- Community
- R-SIG-Finance mailing list
- Quantitative finance: Wilmott forums
- Quantnet
- fattail
- FINVIZ
- CRAN task views
- Introduction to R data analysis
- NY Times, Jan 2009, "Data Analysts Captivated by R's Power"
- R for Beginners (Emmanuel Paradis)
- Introduction to R (core dev team)
- R time-series tutorial (Shumway & Stoffer)
- CRAN contributed docs
- Google Books preview, "financial time series analysis"
Subscribe to:
Posts (Atom)