Plotting prices as a function of time

4 views (last 30 days)
jacob Mitch
jacob Mitch on 14 Oct 2019
Im trying to understand data from a data file. If I have
d∆t(t) = x(t + ∆t) − x(t) , where ∆t is the trading days difference and x is price
If I assign t as
numberofdays=10; %and use 1 to number of days as a time axis
t=1:lenghth(numberofdays) %where number of days is the are the number of trading days in the data
x=[5;4;3;4;5;6;7;8;5;3]; %prices
. For each ∆t I should get a new time seriesd ∆t that is of length numberofdays−∆t, How would I plot d1(t) and d2(t) as a function of time.

Answers (0)

Categories

Find more on Financial Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!