Phone: +1 (888) 427-9486
+1 (312) 324-0367
Fax: +1 (312) 238-9092
Or use our Contact Form
Data Preparation
| Attachment | Size | |
|---|---|---|
| Data Preparation.xls |
The econometric theory assumes homogeneous (equally spaced) observations throughout time, so hourly, daily, weekly, or monthly observations can be used for that purpose. Please note, although "daily" in a financial time series references a working day (as opposed to a calendar day), the time series is still treated as equally spaced.
Usually, a data set is stored in Excel as a single column in an ascending or descending manner.
Recommendations: It is recommended that you copy the date components and the associated observation used in this example.
Example 1:
Using the Yahoo Finance website (finance.yahoo.com), run a query for the historical prices for Microsoft Corp between January 3rd, 2000 and May 1st, 2009 and download the data as an MS Excel file (i.e. use the hyperlink shown immediately after the result table).
Next, load the data into Excel as follows:
Please note:
- We have 5 prices: Open, High, Low, Close and Adjusted Close.
- Observations are sorted in ascending chronicle order; the date increases as we scroll down the sheet. Depending on the format of the data that Yahoo provides, your observations may instead be sorted in descending order. If so, please make a note of it for future reference.
Next, we'll plot the adjusted closing price over time.
Save the spreadsheet as an MS Excel workbook.
Strategy's Returns
The price time series does not look like a random signal, and in many cases one can detect a trend over time. The econometric theory assumes a weak stationary process (variance and covariance constant over time). To overcome this issue, we compute our strategy returns and examine this time series instead.
Strategy: In this example, we construct a hypothetical strategy that buys MSFT at market open and closes the position at market close.
![]() |
![]() |
Where:
: Daily gross return
: Daily price at market close
: Daily price at market open
: Daily log return
Next, we construct a daily log return series as a new column (e.g. column H) in the worksheet.
The graph above shows the daily log returns, which look like random noise. We will use this series for our analysis.

![\[ R_t=\frac{S_t^C}{S_t^O} \]](/sites/all/files/tex/b5a1f8215066221f61b1553cb53ba3874d3f100f.png)
![\[ r_t=ln(\frac{S_t^C}{S_t^O})=ln(S_t^C)-ln(S_t^O) \]](/sites/all/files/tex/2bcf2ee0f33efe51e23e368e43baa06e97abeb8c.png)