FINN2061 Programming for Finance
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
FINN2061 Programming for Finance
Part A: Literature Review (30 Marks)
- Briefly explain the three forms of EMH: Weak Form, Semi-strong
Form and Strong Form.
- 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.
- 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).
- 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).
- Choose a forecasting model, such as:
- Linear Regression (OLS Regression)
- Moving Average (e.g., 3-month average)
- Machine Learning Models
- Implement the forecasting model using Python to predict returns of your chosen commodity. Include all code in the Jupyter Notebook.
- 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?
- 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).
- 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.
- 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.
- Students are permitted to use AI assistance strictly for programming purposes.
- AI-generated or AI-improved code must be attributed in an appendix table.
- 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.
| Code Segment |
AI Prompt Used |
Impact on Strategy |
|
|
|
|
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
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.
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
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.
Performance in the summative assessment for this module is judged against the following criteria:
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.
2026-03-31