By the WebSim™ Team
This chapter can be used as a handy reference guide to all operators and data fields that can be used for building alphas.
AVAILABLE MARKET DATA
The available market data fields given in Table 29.1 can be used in your alpha expression.
Table 29.1 Price volume data for equity
|Data name||Description||Python usage|
|Open||Daily open price||dr.GetData("open")|
|Close||Daily close price||dr.GetData("close")|
|High||Daily high price||dr.GetData("high")|
|Low||Daily low price||dr.GetData("low")|
|Vwap||Daily volume weighted price||dr.GetData("vwap")|
|adv20||Average daily volume in past 20 days||dr.GetData("adv20")|
|sharesout||Daily outstanding shares||dr.GetData("sharesout")|
Open, high, low, close, volume, vwap, and sharesout represent data that has been carefully adjusted for corporate actions (such as dividend, split, reverse split, etc.) and ready to be used for alpha computation. As a comparison, raw price or volume is actually not ready for direct usage in alpha code; without this distinction, alpha will be unstable.
This can be explained in an example: suppose GOOG (Google) will split 2:1 on April 2 and its current price is at $1,200.
On April 3, it would likely be around $600. Without adjusting, raw price alone will distort the price action.
Adjusted data must be updated every day. For efficiency, WebSim™ calculates only for a fixed look-back period. ...