You are on page 1of 3

DF 2

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, from $12 to $9 from
February 1st to February 28th, and from $9 to $15 from March 1st to March 31th is the price
change from $10 to $15 a straight line?
It is clear that in each of the three time intervals mentioned there was a complex daily variation
of prices as in an electrocardiogram. But what would be a simplified solution for a first naive
view of the situation? Would a simple function hold up? What is the simplest function to
represent this situation? Does your naïve initial and simplified model allow you to predict the
behavior of the stock in the next month?
How can I use three “pieces” of lines to describe the price movements from the beginning of
January to the end of March? Show the graph for the price movement.
Go to www.desmos.com/calculator, and write your equations following the example
y=x+2 {0 < x < 2}
y = –x + 6 {2 < x < 5}
y = 2x – 9 {5 < x < 8}

-----------------------

The stock price in January


· The stock price in January 1st is $10
· The stock price in January 31st is $12

The stock price in February


· The stock price in February 1st is $12
· The stock price in February 28th is $9
The stock price in March
· The stock price in March 1st is $9
· The stock price in March 31st id $15

If t is the number of days and P for the Price in stock, the define of input and output should be:
Input: t, the number of days in month
Output: P(t) the stock price

January, the stock price increase from $10 to $12 along 31 days
t is the number of days since January 1st and P is the stock price:
P for t = (12-10)/31t + 10
= (2/31)t+ 10
P(t) = (2/31)t+ 10 {0< t< 32}

February, the stock price decrease form $12 to $9 along 28 days


t is the number of days since February 1st and P is the stock price:
P for t = (9- 12)(t- 31)/28+ 12
= -(3/28)t+ 93/28+ 12
= -(3/28)t+ 429/28
P(t) = -(3/28)t+ 429/28 {31< t< 60} from January 1st until February 28th

March, the stock price goes from 9 to 15 in 31 days,


P for t = (15- 9)(t- 59)/31+ 9
= (6/31)t - 354/31+ 9
= (6/31)t - 279/31
P(t) = (6/31)t- 279/31 {59< t< 90} from January 1st until March 31st

For the stock price, the line is linear but this is not a straight line because the line is not in the
same direction. We can see from the example, we see that the stock price is up and down.
The simplest function to represent this situation is linear function f(x) = mx + b. This is how I
use a given input and output to build a model. But the simplified model doesn’t allow me to
predict the behavior of the stock in the next.

You might also like