Reset Password

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form

Register

Bids

2

Project-Budget

$10- $30

Active

You are given a series of trades Each trade has a

Project Description:

<p style="color:#dddddd;font-family:'museo-sans', sans-serif;background-color:#393937;">You are given a series of trades. Each trade has a key, a value, a quantity, and a sequence number. For each trade, print the weighted moving average of all the trades for that particular key. Round your average to two decimal places. If the sequence number for any trade <span><span style="font-size:1.21em;font-family:'KaTeX_Main';"><span>T</span><span><span><span style="font-family:'KaTeX_Math';font-style:italic;">T</span></span></span></span></span> is less than the sequence number for any previous trade, throw out <span><span style="font-size:1.21em;font-family:'KaTeX_Main';"><span>T</span><span><span><span style="font-family:'KaTeX_Math';font-style:italic;">T</span></span></span></span></span>. Do not print anything for <span><span style="font-size:1.21em;font-family:'KaTeX_Main';"><span>T</span><span><span><span style="font-family:'KaTeX_Math';font-style:italic;">T</span></span></span></span></span> or factor it into your WMA.</p> <p style="color:#dddddd;font-family:'museo-sans', sans-serif;background-color:#393937;"><span><span style="font-size:1.21em;font-family:'KaTeX_Main';"><span>M_{x+1} = {(M_x * Q_x)+(v_{x+1} * q_{x+1}) \over Q_{x+1}}</span><span><span><span><span style="font-family:'KaTeX_Math';font-style:italic;">M</span><span><span><span style="font-size:1em;"><span style="font-size:0em;">​</span></span><span style="font-size:.7em;"><span><span style="font-family:'KaTeX_Math';font-style:italic;">x</span><span>+</span><span>1</span></span></span></span><span><span style="font-size:1em;"><span style="font-size:0em;">​</span></span>​</span></span></span><span>=</span><span><span style="font-size:1em;"><span><span><span style="text-align:center;"><span style="font-size:1em;"><span style="font-size:0em;">​</span></span><span style="font-size:.7em;"><span><span><span style="font-family:'KaTeX_Math';font-style:italic;">Q</span><span><span><span style="font-size:1em;"><span style="font-size:0em;">​</span></span><span style="font-size:.71429em;"><span><span style="font-family:'KaTeX_Math';font-style:italic;">x</span><span>+</span><span>1</span></span></span></span><span><span style="font-size:1em;"><span style="font-size:0em;">​</span></span>​</span></span></span></span></span></span><span style="text-align:center;"><span style="font-size:1em;"><span style="font-size:0em;">​</span></span></span><span style="text-align:center;"><span style="font-size:1em;"><span style="font-size:0em;">​</span></span><span style="font-size:.7em;"><span><span>(</span><span><span style="font-family:'KaTeX_Math';font-style:italic;">M</span><span><span><span style="font-size:1em;"><span style="font-size:0em;">​</span></span><span style="font-size:.71429em;"><span style="font-family:'KaTeX_Math';font-style:italic;">x</span></span></span><span><span style="font-size:1em;"><span style="font-size:0em;">​</span></span>​</span></span></span><span>∗</span><span><span style="font-family:'KaTeX_Math';font-style:italic;">Q</span><span><span><span style="font-size:1em;"><span style="font-size:0em;">​</span></span><span style="font-size:.71429em;"><span style="font-family:'KaTeX_Math';font-style:italic;">x</span></span></span><span><span style="font-size:1em;"><span style="font-size:0em;">​</span></span>​</span></span></span><span>)</span><span>+</span><span>(</span><span><span style="font-family:'KaTeX_Math';font-style:italic;">v</span><span><span><span style="font-size:1em;"><span style="font-size:0em;">​</span></span><span style="font-size:.71429em;"><span><span style="font-family:'KaTeX_Math';font-style:italic;">x</span><span>+</span><span>1</span></span></span></span><span><span style="font-size:1em;"><span style="font-size:0em;">​</span></span>​</span></span></span><span>∗</span><span><span style="font-family:'KaTeX_Math';font-style:italic;">q</span><span><span><span style="font-size:1em;"><span style="font-size:0em;">​</span></span><span style="font-size:.71429em;"><span><span style="font-family:'KaTeX_Math';font-style:italic;">x</span><span>+</span><span>1</span></span></span></span><span><span style="font-size:1em;"><span style="font-size:0em;">​</span></span>​</span></span></span><span>)</span></span></span></span><span style="text-align:center;"><span style="font-size:1em;"><span style="font-size:0em;">​</span></span>​</span></span></span></span></span></span></span></span></span></p> <p style="color:#dddddd;font-family:'museo-sans', sans-serif;background-color:#393937;">Where M = weighted moving average, Q = total quantity, q = current quantity, and v = current value.</p>

About student:

0 rating(0 Reviews)

Tutors Bidding

Ratings

Bid Price

4.9807692307692 (104 reviews)

$50

0 (0 reviews)

$30