Chapter 3 · Section 3 practice

Simple Regression with SPY and NVDA Returns

Work from question 1 to 10. Edit your Python box, click Run Code, review the result, then click Submit attempt. Reference answers unlock after all ten attempts are submitted. This records completion, not correctness. Each box runs independently. Progress is saved in this browser.

Submitted: 0 / 10

1. Read paired returns

Warm-up. Print the first three paired SPY and NVDA daily returns.

Write your answer, then run it.

2. Count complete dates

Warm-up. Print the number of complete return dates.

Write your answer, then run it.

3. Check the time split

Warm-up. Print the final training date and first test date.

Write your answer, then run it.

4. Read fitted coefficients

Build your skills. Print the intercept and SPY slope.

Write your answer, then run it.

5. Interpret the slope

Build your skills. Print the fitted change in NVDA return, in percentage points, for a one percentage-point increase in SPY return.

Write your answer, then run it.

6. Interpret the intercept

Build your skills. Print fitted NVDA return, as a percentage, when SPY return is zero.

Write your answer, then run it.

7. Supply a scenario

Build your skills. Predict NVDA return, as a percentage, when SPY return is 1%.

Write your answer, then run it.

8. Inspect a residual

Challenge. Print the first training date’s observed, fitted and residual NVDA returns.

Write your answer, then run it.

9. Read a slope interval

Challenge. Print the 95% confidence interval for the SPY slope.

Write your answer, then run it.

10. State the required input

Challenge. Print the SPY inputs needed for the first three reserved test dates.

Write your answer, then run it.

Reference answers are locked until all 10 attempts are submitted.