Perform a simple moving average of the price index

Assignment Help Other Subject
Reference no: EM132377354

Assignment -

Learning Objectives

Work with realworld datasets that can be represented using linear data structures.

Apply vectorization concepts to an iterative problem.

Explore different programming paradigms to solve problems.

This is an individual homework assignment.

Please complete this homework assignment within the Jupypter notebook environment, making use of Markdown and Code cells to properly format your answers.

Your completed Jupyter notebook is to be submitted via the HW2 dropbox on D2L.

Question 1 - Visualizing trends in an index

"This question asks you to plot the Bitcoin price index (BPI) along with 5-day and 10-day averages. Please execute the code cell below; it will read in a csv file containing the daily closing price from Sep. 1, 2018 to Aug. 31, 2019. Perform the following tasks. You may use any built-in Python functions as well as data strucutres and functions provided by the 'numpy' library.

Observe that the closing prices are at a daily interval. We therefore do not need the date information. Clean up the data and only retain the price information. Store the result in a list or a numpy array in floating point format.

Perform a simple moving average of the price index. The number of days $N$ to average over should be adjustable. If you are using 'numpy', you may find the function.

Plot the raw price index data along with 5-day and 10-day simple moving average. Plot on the same figure in order to help you visually ascertain the effect of the filter.

What is the effect of the moving average filter? In what circumstances would you _not_ want to use a moving average?

Question 2 - Vectorized Race Simulation

1. Eight athletes are competing in a 1500 m race. Using 'numpy' , write a vectorized race simulation according to the following criteria:

The granularity of the simulation is 1 s, i.e. each iteration in your simulation represents 1 second.

During each iteration, each athelete can randomly take 1, 2, 3, or 4 steps. Each step is 1 m long.

When the race is complete, return the winner and the winning time. There should not be any ties. If there is a tie, select a winner at random.

 Please pay attention to the following:

There should only be one loop in your simulation: the loop that advances the simulation by a second.

All other operations should be done using vectorized array operations and boolean indexing.

2. Run your simulation 10,000 times. For each run, record the winner and the winning time. Produce a bar chart showing the number of times each athelete won. Also display a bar chart showing the average winning time for each athlete.

Attachment:- Assignment Files.rar

Reference no: EM132377354

Questions Cloud

Response discipline objectives to virtual objectives meeting : All incident commanders bring their individual response discipline objectives to the virtual objectives meeting.
How do whole foods executive compensation practices : How do Whole Foods executive compensation practices compare with those of other firms?
Utilitarian theory of business ethics : The Utilitarian Theory of business ethics considers levels of happiness of all those involved in the business transaction under consideration.
Amazon alexa and google platforms : Should the government take an active role in regulating Facebook, Amazon Alexa and Google platforms?
Perform a simple moving average of the price index : Perform a simple moving average of the price index. The number of days $N$ to average over should be adjustable. If you are using 'numpy', you may find function
Are there things to be aware of on a day to day basis : What should the average American be aware of in terms of the safety of our food supply?
How much profit or loss will the company make : Whackemhard Sports is planning to introduce a new line of tennis rackets. How much profit will the company make if it produces and sells 2,500 units.
APC313 Financial Markets Assignment problem : APC313 Financial Markets Assignment help and solution, University of Sunderland HONG KONG, Assessment help - explain key theories and models of financial market
What is the actual nature of transportation demand : What are the major forces or external factors that have impacted our economy during the latter part of the 20th and early part of the 21st centuries?

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd