Programming Homework 1- Futures Spread Solved

35.00 $

Category: Tags: , , ,
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

Rate this product

Futures Spread Dynamics

Here we will practice obtaining data for spreads in futures markets, and characterizing their dynamics.

2 Data

Obtain second month quarterly 1 futures prices from the Quandl OWF database for two pair W, X; Y, Z (where W, X and Y and Z depend on your student ID number) for 3 Dec 2019 though 31 Aug 2021. Our defi- nition of second month is the contact where the number of days to futures expiration is the smallest available value greater than 302.

Form the spreads s(1), s(2) between these numbers as the difference s(1) = ttt

X − W and s(2) = Z − Y . ttttt

3 Analysis

Characterize the relative dynamics of s(i) in reasonable ways, using charts t

and statistics.
For example, compute the median and standard deviation of the difference

d(N) between s(i) and an N-day rolling average of s for some values of N. ttt

1Quarterly in this context means expiring in March, June, September, or December.

2In other words, for each date in the analysis date range, you have to grab all available futures contracts for that date. Then choose the one with lowest time to expiration so long as it is over 30 days. Note the OWF data set is not entirely fit for purpose and will sometimes be missing data for a futures contract just because the options have expired.

1

Examine more quantiles than just the median. Look at tails. Do the spreads correlate? How about their difference (d) values? Do spreads exhibit patterns over time?

3.1 Data

Futures pairs W, X; Y, Z (in order) are as given by the last two distinct digits3 of your student number as follows:

0. ICE B B ICE G G 0.1342281879194631 (1/7.45) 1. ICE B B ICE G G 0.1342281879194631 (1/7.45) 2. ICEBBICETT
3. ICE T T ICE G G 0.1342281879194631 (1/7.45) 4. CBTFVFVCBTTUTU

5. CBTFVFVCBTTYTY
6. CBTFVFVCBTUSUS
7. CBTTUTUCBTTYTY
8. CBTTUTUCBTUSUS
9. NYM RB RB ICE G G 0.003198489678291494 (100 /118.35 / 264.172)

The final number, where present, is a multiplier you should apply to X or Z before computing the spreads s.

When downloading from Quandl, you have to use the years and the quar- terly codes (H, M, U, Z) individually, there is no facility for Quandl to com- bine them itself.

Examples of st on various dates that you should be matching in your own data are as follows:

0. ICEBBICEGG
• 2021-02-08 6.606510

3So, if your student ID ends in 6222 then use 6 and 2. 2

• 2021-02-09 6.719866 1. ICEBBICETT

• 2021-01-19 -2.54 • 2021-01-20 -2.86

2. ICETTICEGG
• 2021-01-19 8.966309

• 2021-01-20 9.279866

3. CBTFVFVCBTTUTU

• 2021-02-18 -15.000000 • 2021-02-19 -14.496875

4. CBTFVFVCBTTYTY • 2021-02-18 10.382812

• 2021-02-19 9.375000

5. CBTFVFVCBTUSUS

• 2021-02-18 39.023438 • 2021-02-19 36.593750

6. CBTTUTUCBTTYTY • 2021-02-18 25.382812

• 2021-02-19 23.871875

7. CBTTUTUCBTUSUS

• 2021-02-18 54.023438 • 2021-02-19 51.090625

8. NYM RB RB ICE G G 0.003198489678291494 (100 /118.35 / 264.172)

• 2021-01-26 -0.124285 • 2021-01-27 -0.200692

3

  • hw1_futures_spread-lvgnyz.zip