AFIN2070: Financial Data Analytics Data Project

Download Solution Order New Solution

Questions

1. The sheet titled “inflation” in the data file displays the inflation rates of various countries over the years.

  1. Reshape and modify the dataset so that the first column contains the years, and each of the remaining columns contains the inflation rates for a specific country. The column headers should be the names of the respective countries. Remove any unnecessary columns during this process.
  2. Create a line chart (with appropriate labels) showing the inflation rates over time for Australia and the United Kingdom. Also, calculate and print the average inflation rate for Canada.

2. The sheet titled “telesale” contains data from a bank’s direct marketing campaign (via phone calls) to customers, along with the outcomes. Refer to the “telesale_note” sheet for descriptions of the variables. This dataset will be used for a machine learning exercise involving linear models and tree-based models (such as decision trees, random forests, and gradient-boosted trees). Your task is to appropriately transform the variables, applying different transformation methods based on the data type: categorical, ordinal, and numerical.

3. The sheet titled “stock” contains the price history of various stocks. Your assigned stock to work with is Boeing Company (BA-US).

  1.  Conduct a formal statistical test for stationarity on the stock price series at the 5% significance level. Print and interpret the results.
  2. You are tasked with modelling the stock’s simple return with the ARMA(p, q) model. Calculate the simple returns for the stock. Determine the optimum orders p and q using both the AICc and BIC criteria. If the values of p and q selected using AICc differ from those selected using BIC, provide an explanation (note: you are required to use the function arma_order_select_ic from statsmodels, with maximum values of p and q set to 5 in the search) 
  3. Using the values of p and q selected based on the BIC criterion, estimate the ARMA model and forecast the returns for the next 3 periods. Print the results.

4. The sheet titled “stock” contains the price history of various stocks. Your task is to optimize a portfolio that includes Exxon Mobil, GE Aerospace, Eli Lilly, Prologis, and Amazon.

  1. Calculate the log-returns for these stocks. Run a simulation of 1,800 portfolios with randomly assigned non-negative weights for the selected stocks. In the simulation, compute the mean log-return and standard deviation for each portfolio. Create a chart that plots the mean return of each portfolio against its standard deviation.
  2. Print the details of the global minimum variance portfolio, including its mean return, standard deviation, and the weights of the stocks. (You may need to modify the simulation code to capture and display the weights.)

5. The sheet titled “house” contains information on house prices per unit area and some house characteristics:

  • Y: House price per unit area (thousand AUD) 
  • X1: House age (in years) 
  • X2: Distance to the nearest train station (in meters) 
  • X3: Number of nearby convenience stores
  1. Regress Y on the variables [X1, X2, X3] using heteroskedasticity-robust standard errors. Print the regression results. Which explanatory variable is statistically significant at the 5% level? Interpret the economic meaning of the coefficient on X3.
  2. Before running the regression, would it be better to apply a log transformation to X2? Explain your reasoning.
  3. Calculate the correlation coefficient (ρ) between X1 and Y. Then, standardize both X1 and Y, and regress the standardized Y on the standardized X1. Compare the coefficient of the standardized X1 with ρ, and explain the result.

6. The sheet titled “house” contains information on house price per unit area and some house characteristics. In this machine learning exercise, Y is the target variable, and the remaining variables are the features.

  1. Normalize the variables X1, X2, and X3. Then, split the data into a training set (75%) and a test set (25%), using 99 as the value for random_state.
  2. Perform a grid search with cross-validation on the training set to select the optimal value of alpha for two models: Ridge and Lasso. Set parameter scoring='r2'. The candidate values for alpha are: [0.001, 0.01, 0.1, 1, 10, 100]. Print the best alpha for each model. Then, fit each model with its best alpha on the test set and print the R⊃2; score. Finally, determine which model performs better on the test set.

7. The sheet titled “bankruptcy” contains financial information about corporate customers of a bank, along with an indicator of whether each company went bankrupt. The target variable is “Bankrupt?”, and the remaining variables are the features.

  1. Split the dataset into two parts: a training set (80%) and a test set (20%), using 99 as the value for random_state. Fit each of the following classification models to the training set and evaluate their performance on the test set using the accuracy score. Print the accuracy scores for both the training and test sets. Use the following parameters for each model:
    • Logistic Regression: max_iter=1000, regularization parameter =1
    • Random Forest: use 100 trees, depth level of each tree is 5, random_state=99 
    • Gradient Boosted Trees: use 100 trees, depth level of each tree is 5, learning rate is 0.01, random_state=99 Which model performs the best on the test set?
  2. Considering the economic context and the distribution of the target variable, which of the following evaluation metrics might be more appropriate than accuracy, and why? (You do not need to provide the actual metric scores.)
    • Precision 
    • Recall 
    • F1 Score

Assessment Summary

This assessment evaluates a student’s ability to apply data analytics, econometric modeling, and machine learning techniques using multiple real-world datasets from various domains — inflation, banking, stock markets, and housing. It tests data transformation, visualization, regression modeling, time series forecasting, and predictive modeling.

Key Assessment Tasks:

  1. Inflation Data Transformation and Visualization:
    • Reshape inflation data so each column represents a country.
    • Create a line chart for Australia and the UK.
    • Calculate the average inflation rate for Canada.
  2. Telesale Data Preprocessing:
    • Apply appropriate transformations to categorical, ordinal, and numerical variables.
    • Prepare data for machine learning models such as linear and tree-based algorithms.
  3. Stock Analysis (Boeing):
    • Conduct a stationarity test on stock price data.
    • Build an ARMA(p,q) model using AICc and BIC for model selection.
    • Forecast stock returns for three future periods.
  4. Portfolio Optimization:
    • Calculate log returns for five major stocks.
    • Simulate 1,800 random portfolios and identify the global minimum variance portfolio.
    • Display portfolio performance through a mean-variance plot.
  5. House Price Regression Analysis:
    • Regress house price per unit area (Y) on age, distance to station, and nearby stores.
    • Use heteroskedasticity-robust standard errors and identify statistically significant variables.
    • Interpret economic meaning and test correlation between standardized variables.
  6. Machine Learning Regression (Ridge & Lasso):
    • Normalize features, split data into train-test sets.
    • Use grid search with cross-validation to find the best alpha for Ridge and Lasso.
    • Compare models using R⊃2; and select the best-performing model.
  7. Bankruptcy Classification Models:
    • Fit Logistic Regression, Random Forest, and Gradient Boosted Trees.
    • Compare model accuracy and suggest a more suitable evaluation metric (Precision, Recall, or F1 Score).

Academic Mentor’s Step-by-Step Guidance

The academic mentor guided the student through each section methodically to ensure a deep conceptual and practical understanding of data analytics and econometric modeling.

Step 1: Understanding and Structuring the Datasets

The mentor began by reviewing all Excel sheets, helping the student understand variable definitions and data structures. They discussed which columns were relevant, how to reshape the inflation dataset, and how to clean unnecessary data to ensure accurate analysis.

Step 2: Data Transformation and Visualization

Using Python’s Pandas and Matplotlib, the mentor demonstrated how to reshape wide-to-long datasets, calculate average values, and visualize inflation trends through line charts. This introduced the student to data wrangling and basic descriptive analytics.

Step 3: Preparing Data for Machine Learning

The mentor explained the importance of data preprocessing and guided the student to encode categorical variables, normalize numerical features, and create ready-to-train datasets. The student learned about data transformation consistency and the need to handle variable types correctly.

Step 4: Time Series Modeling (ARMA)

The mentor walked the student through performing the Augmented Dickey-Fuller test to check stationarity and then guided model order selection using AICc and BIC. The mentor emphasized interpreting different criteria results and taught forecasting through the statsmodels library.

Step 5: Portfolio Optimization Simulation

To strengthen applied financial analytics skills, the mentor explained Monte Carlo simulation and guided the student to simulate 1,800 random portfolios. They calculated returns, risks, and identified the Global Minimum Variance Portfolio, visualizing efficient frontiers in Python.

Step 6: Regression and Statistical Interpretation

The mentor guided the student through econometric regression using heteroskedasticity-robust errors and helped interpret variable significance, particularly the economic meaning of coefficients. They discussed when log transformations improve model interpretability.

Step 7: Machine Learning Model Evaluation

The student, under mentor supervision, executed Ridge and Lasso regressions with grid search and cross-validation. The mentor explained hyperparameter tuning, model performance evaluation, and how R⊃2; reflects predictive accuracy.

Step 8: Classification Modeling and Model Comparison

The mentor provided insights into building classification models—Logistic Regression, Random Forest, and Gradient Boosted Trees—and comparing them based on accuracy and more robust metrics like Precision, Recall, and F1 Score, emphasizing when accuracy might mislead model evaluation.

Outcome and Learning Objectives Achieved

By the end of the guided process, the student successfully developed a comprehensive understanding of how to manage, model, and interpret real-world financial and economic datasets.

Key Learning Outcomes:

  • Data Cleaning & Transformation: Gained hands-on experience in reshaping datasets for analysis.
  • Visualization & Interpretation: Learned to represent data through informative visuals and interpret trends.
  • Statistical & Econometric Modeling: Developed skills in regression, correlation, and heteroskedasticity analysis.
  • Time Series Analysis: Applied ARMA modeling for forecasting financial data.
  • Portfolio Optimization: Understood risk-return trade-offs using simulation techniques.
  • Machine Learning Proficiency: Mastered preprocessing, model tuning, and evaluation using Ridge, Lasso, and tree-based models.
  • Critical Evaluation Skills: Learned to compare metrics and select the most appropriate model based on context.

 

Get Inspired But Submit Smartly

Looking to understand how to approach your assignment the right way? Download this sample solution to explore expert writing techniques, data analysis structure, and formatting standards followed by top academic professionals. This sample is designed for reference and learning purposes only submitting it as your own work may lead to plagiarism penalties from your university.

To ensure complete originality and meet your unique assessment requirements, you can order a fresh, custom-written solution crafted by our professional academic writers. Each assignment is written from scratch, 100% plagiarism-free, and tailored to your specific topic, university guidelines, and marking criteria.

Why Choose a Fresh Custom Solution?

  • Completely original and plagiarism-free content
  • Expert guidance from qualified academic writers
  • Delivered on time with accurate data and analysis
  • Helps improve grades and understanding of the subject

Disclaimer: The provided sample is for reference and educational guidance only. Do not submit it as your final submission to avoid academic misconduct.

Download Sample Solution  Order Fresh Assignment

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.