How to calculate differences between time series?

miner77
miner77 New Altair Community Member
edited November 5 in Community Q&A
Hello,

I have time series from different markets and would like to calculate the price delta between the markets.
For each market I have a cvs file with following columns: Market, Time stamp, Price.
As any price change triggers a new data entry, the time stamps from each market also differ.

How can I transform the time series data within rapidminer to calculate the price differences between the different markets?
Any recommendations?

Thanks!
Tagged:

Answers

  • MariusHelf
    MariusHelf New Altair Community Member
    This requires a non-trivial process. One approach is to create a new field that extracts the desired time-resolution from the time stamp, e.g. day. This can be done with the Date to Numerical operator. Be sure to set the reference date to "epoch".

    Then aggregate by this attribute and calculate e.g. the average of the prices.

    That will result in a dataset where each time series has at most one value per day, and then you can calculate the difference of the daily average prices.

    If some of the data has missing values for some days, you can specify the day attribute as id and use Fill Data Gaps and Replace Missing Values (Series) to replace those missing values in the desired fashion.

    Happy Mining!
    ~Marius