Question: Please answer all steps with the respective code. The ETF being used will be Amazon. Please label which step is apart of which code and

Please answer all steps with the respective code. The ETF being used will be Amazon. Please label which step is apart of which code and show the charts needed in the steps. Please i need help. We use python, pandalibrary and yfinance(for the data).

Primary Objective: Use Berry Cox's price momentum factors to select basket of assets for a long-short portfolio. Backtest your algorithm for 5 years to check for performance of algorithm. Background: The use of computers and coding allows finance professionals to identify new alpha factors Alpha factors are ways of quantifying where alpha is being generated by an asset. You will be responsible for using Berry Cox's list of alpha factors to determine the long/short baskets for your portfolio. But in order to test your code and its asset selections, back-testing must be performed. The Requirements: Step 1: Choose an ETF with a minimum of 100 assets, identify those assets Step 2: Retrieve historical data for your chosen ETF Step 3: Calculate the price momentum factors for each asset in your ETF Step 4: Using the price momentum factors, calculate the monthly z-factor score for each asset Step 5: Identify long and short baskets (10 to 15 assets in each) using calculated z-factors Step 6: Create a backtest to validate performance of your algorithm based on monthly restructuring over the previous 5 years. Step 7: Chart: 1. Monthly portfolio return bar chart (poseg coloring) vs ETF 2. Monthly return for long picks vs short picks vs ETF 3. Cumulative portfolio return vs ETF Extra Credit: Calculate the optimized weighting of the monthly restructuring and include in backtesting of algorithm. Make sure the weighting is performed each month when the portfolio is restructured. Parting Thoughts: Remember, we'll work through all the Python and finance steps you need to understand to be able to calculate alpha factors. That being said, I'm not going to just give you everything - you'll be responsible for determining the actual function for each factor and whether it's a positive or negative factor. Berry Cox's Alpha Generators are on the next page. I recommend beginning on this project sooner rather than later so you have time to experiment and research how to calculate the specific factors correctly as well as build your backtest. \begin{tabular}{|c|c|} \hline Category & Description of Individual Factor \\ \hline \begin{tabular}{c} Traditional \\ Value \end{tabular} & \begin{tabular}{l} Price / Leading 12 Month Earnings (Weighted Avg of FY1 and FY2) \\ Price / Trailing 12 Month Sales \\ Price / Trailing 12 Month Cash Flow \\ Price / Book Value \\ Leading Dividend Yield \end{tabular} \\ \hline \begin{tabular}{c} Relative \\ Value \end{tabular} & \begin{tabular}{l} Industry Relative Price / Trailing Sales - Current Spread vs. 5 Year Avg \\ Industry Relative Price / Trailing Earnings - Current Spread vs. 5 Yr Avg \\ Industry Relative Price / Trailing Cash Flow - Current Spread vs. 5Yr Avg \\ Industry Relative Price / Trailing Sales \\ Industry Relative Price / Forward Earnings \\ Industry Relative Price / Trailing Cash Flow \end{tabular} \\ \hline \begin{tabular}{c} Historical \\ Growth \end{tabular} & \begin{tabular}{l} Consecutive Quarters of Positive Changes in Trailng 12 Month Cash Flow \\ Consecutive Quarters of Positive Change in Quarterly Earnings \\ 12 Month Change in Quarterly Cash Flow \\ 3 Year Average Annual Sales Growth \\ 3 Year Average Annual Earnings Growth \\ Slope of Trend Line Through Last 4 Quarters of Trailing 12M Cash Flows \end{tabular} \\ \hline \begin{tabular}{c} Expected \\ Growth \\ \end{tabular} & \begin{tabular}{l} 5 Year Expected Earnings Growth (First Call \& I/B/E/S Consensus) \\ Expected Earnings Growth: Fiscal Year 2 / Fiscal Year 1 (First Call \& IBES) \end{tabular} \\ \hline \begin{tabular}{l} Profit \\ Trends \end{tabular} & \begin{tabular}{l} Consecutive Qrtrs of Declines in (Receivables+Inventories) / Sales \\ Consecutive Qrtrs of Positive Change in Trailing 12M Cash Flow / Sales \\ Consecutive Qrtrs of Declines in Trailing 12 Month Overhead / Sales \\ Industry Relative Trailing 12 Month (Receivables+Inventories) / Sales \\ Industry Relative Trailing 12 Month Sales / Assets \\ Trailing 12 Month Overhead / Sales \\ Trailing 12 Month Earnings / Sales \end{tabular} \\ \hline \end{tabular} \begin{tabular}{|c|c|} \hline Category & Description of Individual Factor \\ \hline \begin{tabular}{l} Small \\ Size \end{tabular} & \begin{tabular}{l} Log of Market Capitalization \\ Log of Stock Price \\ Log of Trailing 12 Month Sales \\ Log of Total Assets \end{tabular} \\ \hline \begin{tabular}{c} Accelerating \\ Sales \end{tabular} & \begin{tabular}{l} 3 Month Momentum in Quarterly Sales \\ 6 Month Momentum in Trailing 12 Month Sales \\ Change in Slope of 4 Quarter Trend Line through Quarterly Sales \end{tabular} \\ \hline \begin{tabular}{c} Earnings \\ Momentum \end{tabular} & \begin{tabular}{l} Change Since Last Report in Current Quarter (Q1) Estimate / Price \\ 4 Week Change in Leading 12 Month Consensus Estimate / Price \\ 8 Week Change in Leading 12 Month Consensus Estimate / Price \\ Last Earnings Surprise / Current Price \\ Last Earnings Surprise / Standard Deviation of Quarterly Estimates (SUE) \end{tabular} \\ \hline \begin{tabular}{c} Price \\ Momentum \end{tabular} & \begin{tabular}{lc} Slope of 52 Week Trend Line & (20 Day Lag) \\ Percent Above 260 Day Low & (20 Day Lag) \\ 4/52 Week Price Oscillator & (20 Day Lag) \\ 39 Week Return & (20 Day Lag) \\ 51 Week Volume Price Trend & (20 Day Lag) \\ \end{tabular} \\ \hline \begin{tabular}{c} Price \\ Reversal \end{tabular} & \begin{tabular}{l} 5 Day Industry Relative Return \\ 5 Day Money Flow / Volume \\ 10 Day MACD - Signal Line \\ 14 Day RSI (Relative Strength Indicator) \\ 14 Day Stochastic \\ 4 Week Industry Relative Return \\ Last Month's Residual Return from CAPM Model \end{tabular} \\ \hline \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
