2
$\begingroup$

In FinancialData there are two similarly named properties one can request for a given stock symbol: Change and FractionalChange. What is the difference between these two properties?

$\endgroup$
3
$\begingroup$

"FractionalChange" is the change, represented as a fraction of the previous price:

{change = FinancialData["AAPL", "Change"],
 fracchange = FinancialData["AAPL", "FractionalChange"],
 today = Last[Last[FinancialData["AAPL", "Close", {{2013, 7, 1, 0, 0, 0}}]]],
 yesterday = Last[Last[FinancialData["AAPL", "Close", {{2013, 6, 28, 0, 0, 0}}]]]}

(* ==> {12.69, 0.032, 409.22, 396.53} *)

{change, today-yesterday}

(* ==> {12.69, 12.69} *)

{fracchange, (today-yesterday)/yesterday}

(* ==> {0.032, 0.0320026} *)
$\endgroup$
3
$\begingroup$

Consider the closing price of Apple on the last friday (i.e., 4 days ago):

p1 = FinancialData["AAPL", {DatePlus[Date[], -4]}, "Value"]

{396.53}

Now consider the yesterday's closing price (i.e., 1 day ago):

p2 = FinancialData["AAPL", {DatePlus[Date[], -1]}, "Value"]

{409.22}

The difference between these two prices can be calculated:

p2 - p1

{12.69}

This is exactly the dollar ammount, given by the "Change":

FinancialData["AAPL", "Change"]

{12.69}

Now consider the percent change of Apple from friday until monday, given by $\dfrac{P_{t}-P_{t-1}}{P_{t-1}}$:

(p2 - p1)/p1

{0.0320026}

This value is what is given by "FractionalChange":

FinancialData["AAPL", "FractionalChange"]

{0.032}

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.