Creating a back adjusted continuous price series from log returns

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating a back adjusted continuous price series from log returns

Wolfgang Wu
I am trying to create a continuous daily futures contract time series. I've already calculated the log returns for this series and want to create an artificial price series starting with the most recent price (the one with the latest date).
Basically I am trying to create a price series with the following logic:

p(-1) := exp(ln(p(0)) - r)

I have got p(T) and the log return series r and am trying to create the price series.

with
p(0) = todays price
p(-1) = yesterdays price
p(T) = the price at time T (current available price)
r = log return between yesterdays price and todays price

Thanks

Wolfgang Wu

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Reply | Threaded
Open this post in threaded view
|

Re: Creating a back adjusted continuous price series from log returns

Whit Armstrong-3
There are many ways of doing this. You need to decide what your strategy is
for rolling the contracts (vol crossover, OI crossover, expiration, 10 days
before expiration, first notice date, etc.).

Look here for a basic idea about how to do this:
http://github.com/armstrtw/RCommodity

<http://github.com/armstrtw/RCommodity>-Whit


On Fri, Nov 27, 2009 at 9:52 AM, Wob Wu <[hidden email]> wrote:

> I am trying to create a continuous daily futures contract time series. I've
> already calculated the log returns for this series and want to create an
> artificial price series starting with the most recent price (the one with
> the latest date).
> Basically I am trying to create a price series with the following logic:
>
> p(-1) := exp(ln(p(0)) - r)
>
> I have got p(T) and the log return series r and am trying to create the
> price series.
>
> with
> p(0) = todays price
> p(-1) = yesterdays price
> p(T) = the price at time T (current available price)
> r = log return between yesterdays price and todays price
>
> Thanks
>
> Wolfgang Wu
>
> __________________________________________________
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz
> gegen Massenmails.
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
        [[alternative HTML version deleted]]


_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Reply | Threaded
Open this post in threaded view
|

Re: Creating a back adjusted continuous price series from log returns

Patrick Burns-2
I was interpreting the question as looking for:

price.vector <- original.price * exp(cumsum(return.vector))


Patrick Burns
[hidden email]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of "The R Inferno" and "A Guide for the Unwilling S User")

Whit Armstrong wrote:

> There are many ways of doing this. You need to decide what your strategy is
> for rolling the contracts (vol crossover, OI crossover, expiration, 10 days
> before expiration, first notice date, etc.).
>
> Look here for a basic idea about how to do this:
> http://github.com/armstrtw/RCommodity
>
> <http://github.com/armstrtw/RCommodity>-Whit
>
>
> On Fri, Nov 27, 2009 at 9:52 AM, Wob Wu <[hidden email]> wrote:
>
>> I am trying to create a continuous daily futures contract time series. I've
>> already calculated the log returns for this series and want to create an
>> artificial price series starting with the most recent price (the one with
>> the latest date).
>> Basically I am trying to create a price series with the following logic:
>>
>> p(-1) := exp(ln(p(0)) - r)
>>
>> I have got p(T) and the log return series r and am trying to create the
>> price series.
>>
>> with
>> p(0) = todays price
>> p(-1) = yesterdays price
>> p(T) = the price at time T (current available price)
>> r = log return between yesterdays price and todays price
>>
>> Thanks
>>
>> Wolfgang Wu
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz
>> gegen Massenmails.
>>
>> _______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
>>
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.