Skip to main content
< All Topics

WFEquityData and WFTradesData Database Fields Format

Daily equity and trade data are normally stored in the Sqlite database as compress binary data in order to conserve disk space.  However, this is a propriety format.  In order to make the data accessible to people who want to extract this data for external purposes (such as via Sqlite Python scripts), you can enable the following option to store this data in the database in text format:

While this will greatly increase disk usage and the size of the database, it will allow you to extract the equity/text data in a way that is much more efficient than using the “Create individual WF equity” option.

WFEquityData: this is the daily mark-to-market PnL equity data for each day.
WFTradesData: this is the PnL data for each trade.

Data is stored as text “packets”. Each packet contains several entries separated by the “|” pipe character. For WFEquityData each entry is defined as one day. For WFTradesData each entry is the open or closed trade data.

WFEquityData Packet Format

The first packet is:

  • field 1: version indicator (v[n], where “v1” is version 1 format
  • field 2: 1 (EquityDataSourceWalkforwardMWEstimated) or 2 (EquityDataSourceWalkforwardTSActual)

All successive packets are daily market-to-market entries.

  • field 1: date integer yyyymmdd format
  • field 2: mark-to-market net profit of open trades on this day
  • field 3: total entry trades on this date (tally from EntryDate in TS EasyLanguage)
  • field 4: total exit trades on this date (tally from ExitDate in TS EasyLanguage)
  • field 5: market position on this day
  • field 6: 0/1 boolean indicating margin-consuming event for long positions (had long open position or trade this day)
  • field 7: 0/1 boolean indicating margin-consuming event for short positions (had short open position or trade this day)
  • field 8: minutes in market for any open positions or trades on or overlapping this day
  • field 9: closed trade PNL (if any… if mulitple trades in one day, then this is the average PNL of all trades that day)

Example:

v1,1|20130711,0.00,0,0,0,0,0,0,0.00|20130712,0.00,0,0,0,0,0,0,0.00|20130715,-247.50,1,0,1,1,0,655,0.00|20130716,0.00,0,0,1,1,0,1440,0.00|20130717,-600.00,0,0,1,1,0,1440,0.00|20130718,437.50,0,0,1,1,0,1440,0.00|20130719,150.00,0,0,1,1,0,1440,0.00|20130722,300.00,0,0,1,1,0,1440,0.00|20130723,325.00,0,0,1,1,0,1440,0.00|20130724,15.00,0,1,0,1,0,785,380.00|20130725,0.00,0,0,0,0,0,0,0.00|20130726,0.00,0,0,0,0,0,0,0.00

 

WFTradesData Packet Format

The first packet is:

  • field 1: version indicator (v[n], where “v1” is version 1 format

All successive packets are daily market-to-market entries.

  • field 1: date integer yyyymmdd format
  • field 2: time (24 hour format)
  • field 3: trade type (“E” = entry, “X” = exit)
  • field 4: market position (“L” = long, “S” = short, “F” = flat)
  • field 5: trade price
  • field 6: trade dollar PNL (exits only)

Example:

v2|20111206,1140,E,S,268.125,0,0,0|20111206,1305,X,S,266.125,905,-47.5,927.5|20120305,1305,E,S,277.10001,0,0,0|20120306,1140,X,S,275.10001,905,-72.5,627.5|20120330,1305,E,S,267.14999,0,0,0|20120402,1305,X,S,265.14999,905,-110,752.5
Table of Contents