Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python programming A programmer writes a program to calculate a stock indexand incorrectly truncates the indexafter 2 decimal places , rather than usingcorrect rounding. In

Python programming

A programmer writes a program to calculate a stock indexand incorrectly truncates the indexafter 2 decimal places, rather than usingcorrect rounding. In other words a stock valueof 1000.54321 is replaced by 1000.54.

The program is applied in an automated trading program whichrecalculates the stock index everyminute during the normal tradinghours (10am to 4pm) forthe 250 trading days in a year.

Write a Python program to estimate the error in the resultingestimate of the index.

The output from your program should look like this:

image

Instructions Problem A programmer writes a program to calculate a stock index and incorrectly truncates the index after 2 decimal places, rather than using correct rounding. In other words a stock value of 1000.54321 is replaced by 1000.54. The program is applied in an automated trading program which recalculates the stock index every minute during the normal trading hours (10am to 4pm) for the 250 trading days in a year. Write a Python program to estimate the error in the resulting estimate of the index. The output from your program should look like this: Stock Exchange Index Error: ANSWER where ANSWER is the correct answer to the calculation. Prob f X y Z d S Instructions Problem A programmer writes a program to calculate a stock index and incorrectly truncates the index after 2 decimal places, rather than using correct rounding. In other words a stock value of 1000.54321 is replaced by 1000.54. The program is applied in an automated trading program which recalculates the stock index every minute during the normal trading hours (10am to 4pm) for the 250 trading days in a year. Write a Python program to estimate the error in the resulting estimate of the index. The output from your program should look like this: Stock Exchange Index Error: ANSWER where ANSWER is the correct answer to the calculation. Prob f X y Z d S

Step by Step Solution

3.57 Rating (157 Votes )

There are 3 Steps involved in it

Step: 1

Solution Here we will use round function in Python to estimate th... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probability And Statistics

Authors: Morris H. DeGroot, Mark J. Schervish

4th Edition

9579701075, 321500466, 978-0176861117, 176861114, 978-0134995472, 978-0321500465

More Books

Students also viewed these Programming questions