Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit


FINN2061 Programming for Finance

SUMMATIVE ASSIGNMENT
Objective:
Machine learning is changing the world of finance. Explore how machine learning has been used to exploit return predictability across different assets. Compare the arguments of Fama’s Efficient Market Hypothesis (1970) with the recent claims that machine learning can lead to predictability.

Part A: Literature Review (30 Marks)

1. Efficient Market Hypothesis (EMH):
  • Briefly explain the three forms of EMH: Weak Form, Semi-strong

Form and Strong Form.

2. Predictability Claims:
  • Highlight any papers that have been used as evidence against the EMH when using machine learning methodologies.

Part B: Data Analysis and Model Implementation (40 Marks)

Commodity markets offer a strong setting for studying return predictability. Prices of oil, gold, copper and other raw materials often react to shifts in supply, changes in demand, inventory reports and geopolitical pressure. These drivers may lead to brief periods where price movements exhibit structure. Under the efficient market hypothesis, such patterns should not allow systematic forecasting. Your task is to test this idea by examining whether past information contains signals that help predict future returns in your chosen commodity. Possible predictors include past returns, volatility measures and moving averages. You may also construct indicators such as rolling trends, momentum measures or variables derived from price levels.

More advanced approaches could draw on external economic data if desired, although this is optional.

1. Data Collection
Choose at least one major commodity (e.g. Brent crude oil, WTI, gold, copper).


  • You may add a second commodity for comparison (e.g. oil vs gold).
  • Gather price data (spot or front-month futures) from a reliable source (e.g. Yahoo Finance, WRDS, Datastream, FRED, Investing.com).
  • Use a 20-year sample (or the longest consistent sample you can obtain) at a chosen frequency (daily, weekly, or monthly).
  • Convert prices into returns (percentage or log changes).
  • Clearly state how you construct returns (e.g. log returns on futures prices, excess returns over a risk-free rate if used).


2. Descriptive Analysis:
  • Calculate basic statistics for the commodities, such as mean, median,standard deviation, etc.
  • Create a plot of the returns over time to check for patterns or anomalies (e.g., periods of high volatility or stability).
3. Forecasting Model Implementation:
  • Choose a forecasting model, such as:
    • Linear Regression (OLS Regression)
    • Moving Average (e.g., 3-month average)
    • Machine Learning Models
You may choose a model from the literature or develop your own model independently. Original approaches will be rewarded, provided they demonstrate clear thought, sound implementation, and relevant evaluation.
  • Implement the forecasting model using Python to predict returns of your chosen commodity. Include all code in the Jupyter Notebook.
Part C: Critical Assessment (30 Marks)
1. Analysis of Results:
  • Compare the results of your forecasting model with the arguments made in literature you discussed in part A.
  • Discuss whether the commodity returns you predicted show signs of predictability. Do your findings support the Efficient Market Hypothesis, or do they suggest some level of predictability?
2. Limitations and Improvements:
  • Identify potential limitations in your analysis, such as potential biases, data limitations, or methodological constraints.
  • Suggest improvements or alternative approaches that could enhance the model’s performance (e.g. more advanced models, adding economic indicators as predictors).
3. Conclusion:
  • Summary of Findings: Summarise your main findings from the analysis. Did your model show any ability to predict commodity returns?
  • Recommendations: Offer suggestions for further research or testing.
Submission Requirements:
  • File Format: The report must be submitted as a Jupyter Notebook (.ipynb file). Alternative formats will not be accepted.
  • Markdown: Use Markdown in the Notebook for all explanations, details and critiques of trading strategies, analyses and evaluations. Comments within code cells with ‘#’ notation.
Use of AI Assistance:
  • Students are permitted to use AI assistance strictly for programming purposes.
  • AI-generated or AI-improved code must be attributed in an appendix table.
The table should include the following details:
  • A brief description of the code generated or improved using AI.
  • The prompt used to achieve this output.
  • An explanation of how the AI-generated or improved code has materially enhanced the trading strategy's performance.
Appendix Table (not word counted) Example:
Below is a template table for AI assistance attribution:


Code Segment AI Prompt Used
Impact on Strategy



References

Fama, E.F. (1970): "Efficient Capital Markets: A Review of Theory and Empirical Work." Journal of Finance

Welch, I., & Goyal, A. (2008): "A Comprehensive Look at The Empirical Performance of Equity Premium Prediction." Review of Financial Studies

Overall word limit: 2000

This assignment is worth 100% of the overall module mark.

SUBMISSION INSTRUCTIONS

Your completed assignment must be uploaded to Ultra no later than 12:00 midday on 5th May 2026

The assignment should be submitted using the file type: .ipynb

A penalty will be applied for work uploaded after 12:00 midday as detailed in the

Student Information Hub. You must leave sufficient time to fully complete the upload process before the deadline and check that you have received a receipt. At peak periods, it can take up to 30 minutes for a receipt to be generated.

Assignments should be typed, using 1.5 spacing and an easy-to-read 12-point font.

Assignments and dissertations/business projects must not exceed the word count indicated in the module handbook/assessment brief.

The word count should:
§ Include all the text, including title, preface, introduction, in-text citations, quotations, footnotes and any other items not specifically excluded below.
§ Exclude diagrams, tables (including tables/lists of contents and figures), equations, executive summary/abstract, acknowledgements, declaration, bibliography/list of references and appendices. However, it is not appropriate to use diagrams or tables merely as a way of circumventing the word limit. If a student uses a table or figure as a means of presenting his/her own words, then this is included in the word count.

Examiners will stop reading once the word limit has been reached, and work beyond this point will not be assessed. Checks of word counts will be carried out on submittedwork, including any assignments  or dissertations/business projects that appear to beclearly over-length. Checks may take place manually and/or with the aid of the word count provided via an electronic submission. Where a student has intentionally misrepresented their word count, the School may treat this as an offence under

Section IV of the General Regulations of the University. Extreme cases may be viewed as dishonest practice under Section IV, 5 (a) (x) of the General Regulations.

Very occasionally it may be appropriate to present, in an appendix, material which does not properly belong in the main body of the assessment but which some students wish to provide for the sake of completeness. Any appendices will not have a role in the assessment - examiners are under no obligation to read appendices and they do not form part of the word count. Material that students wish to be assessed should always be included in the main body of the text.

Guidance on referencing can be found on Durham University website and in the Student Information Hub.

MARKING GUIDELINES

Performance in the summative assessment for this module is judged against the following criteria:

• Relevance to question(s)
• Organisation, structure and presentation
• Depth of understanding
• Analysis and discussion
• Use of sources and referencing
• Overall conclusions

PLAGIARISM AND COLLUSION

Students suspected of plagiarism, either of published work or the work of other students, or of collusion will be dealt with according to School and University guidelines.

END OF ASSESSMENT