Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
Lines can be used to approximate a wide variety of functions; often a function can be described using many lines. If a stock pr...Asked by melissa
Lines can be used to approximate a wide variety of functions; often a function can be described using many lines.
If a stock price goes from $10 to $12 from January 1st to January 31, and from $12 to $9 from February 1st to February 28th, is the price change from $10 to $9 a straight line?
How can I use two “pieces” of lines to describe the price movements from the beginning of January to the end of February?
I don't believe it will be a straight line, but how do I do the second part of using two pieces of lines to describe the price movements?
If a stock price goes from $10 to $12 from January 1st to January 31, and from $12 to $9 from February 1st to February 28th, is the price change from $10 to $9 a straight line?
How can I use two “pieces” of lines to describe the price movements from the beginning of January to the end of February?
I don't believe it will be a straight line, but how do I do the second part of using two pieces of lines to describe the price movements?
Answers
Answered by
Steve
If we use x as the number of days since the start of the year,
build each piece with a y=mx+b section, where the price starts a t b and the line has slope m ($/day)
January is y = 10 + 2/31 x
February is 12 - 3/28 (x-31)
build each piece with a y=mx+b section, where the price starts a t b and the line has slope m ($/day)
January is y = 10 + 2/31 x
February is 12 - 3/28 (x-31)
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.