FIN551: An analyst wants to test the simple moving average (MA) strategy. She has a hypothesis— if a stock has many instances: Python Programming Assignment, SUSS, Singapore

Question 1

An analyst wants to test the simple moving average (MA) strategy. She has a hypothesis— if a stock has many instances of long-MA and short-MA crossover in a month, it is a bullish signal. She wanted to test if her hypothesis is correct by back-testing it with historical stock prices.

Figure 1 illustrates the crossover of a long MA and a short MA. The details of calculating MA values using daily closing stock prices are given in Appendix A. In the figure, there are three (3) instances in May-2010 where the 7-days and 3-days MA crossed over. The crossovers are observed on dates denoted by the vertical blue lines.

Figure 1. The crossover instances of the 7-day and 3-day MA of an unknown
stock.

The MA values are calculated using daily closing prices.
Given the following Python inputs, determine if the analyst’s hypothesis is correct.

Make use of the alpha vantage module to download the prices of stock from start_dt to end_dt.

Write My Assignment

Hire a Professional Essay & Assignment Writer for completing your Academic Assessments

  • 100% Plagiarism-Free Essay
  • Highest Satisfaction Rate
  • Free Revision
  • On-Time Delivery

Question 2

Evaluate the values of short- and long-MA for stock in the analysis period.

Question 3

Evaluate all the instances where the long- and short-MA cross over. Hence, calculate the number of crossover instances in every month of the analysis period.

Question 4

To test her hypothesis, the analyst needs to know the return of each month in the analysis period. The return for a month t, r(t) is calculated using

where Pt, start and Pt, end are the stock prices at the first and last trading date of the month t. Evaluate the monthly return for each month in the analysis period using Equation (1).

Buy Custom Answer of This Assessment & Raise Your Grades
Get A Free Quote

Order from Academic Writers Bay
Best Custom Essay Writing Services

QUALITY: 100% ORIGINAL PAPER NO PLAGIARISM – CUSTOM PAPER

Why Choose Us?

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee
SATISFACTION

How It Works

  • Click on the “Place Your Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
  • Fill in your paper’s requirements in the “PAPER DETAILS” section.
  • Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
  • Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
  • From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.

About AcademicWritersBay.com

AcademicWritersBay.com is an easy-to-use and reliable service that is ready to assist you with your papers 24/7/ 365days a year. 99% of our customers are happy with their papers. Our team is efficient and will always tackle your essay needs comprehensively assuring you of excellent results. Feel free to ask them anything concerning your essay demands or Order.

AcademicWritersBay.com is a private company that offers academic support and assistance to students at all levels. Our mission is to provide proficient and high quality academic services to our highly esteemed clients. AcademicWritersBay.com is equipped with competent and proficient writers to tackle all types of your academic needs, and provide you with excellent results. Most of our writers are holders of master’s degrees or PhDs, which is an surety of excellent results to our clients. We provide assistance to students all over the world.
We provide high quality term papers, research papers, essays, proposals, theses and many others. At AcademicWritersBay.com, you can be sure of excellent grades in your assignments and final exams.

NO PLAGIARISM