Unit DataFormats; Interface Type TBarData = Record Open, High, Low, Close : Double; StartTime : TDateTime; Volume, PrintCount : Integer; End; TBarList = Array Of TBarData; TFundamentalData = Record // These come from the live quote table. CompanyName, ListedExchange : String; Dividend, Earnings : Double; // We could get these from the exchanges, but they don't update soon // enough for us. When we run at midnight, they are missing the last // trading day. // Hmm. On a second look, that might not be true. Maybe some exchanges // update at different times than others. High52Week, Low52Week : Double; // This is a little bit delicate. There is no history for the put // volume or the call volume. The value that you read is the volume // between the start of the day and the current time. As long as we // read this after hours, we will get the end of day data. After that // we have to record these if we want to keep historical records. PutVolume, CallVolume : Integer; // These come from the security table. PERatio, Beta, Yield, MarketCap : Double; SharesOutstanding : Integer; // These come from the fundamentals table. EpsNetIncome : Double; Income, Revenues, Assets, Debt : Integer; End; TCorporateActions = Record Splits : Array Of Record // Data before this date was one way; data on or after the date is // the other way. Date : TDateTime; // Historical data from TAL has already been adjusted for splits. // If you want to see the original price, and there is only one of // these, and the price comes from before the specified date, then // you need to multiply by the split factor. // If there was more than one split, the most recent one will have // the lowest index. SplitFactor only shows the difference between // the price on the given date and the previous day. If you want to // see the original price, you will have to multiply it by all of // the split factors. SplitFactor : Double; End; // This table has other useful stuff that we might want in the future. // In particular, it says when a stock is delisted. That might help // us when we sanatize the data. End; Implementation End.