When we build simulations, we are often interested in simulating the future in order to make predictions that influence decision-making. In most cases, available data are past records or historic data. Thus it is important to effectively use the existing data in building realistic future simulations.

The Time Series element enables us to easily import existing records and data from Excel spreadsheets and use it in models. Moreover, GoldSim 10.1 and later versions include Time Shifting Options that let us time-shift historic data to the simulation time period.

The Time Shifting Options can be found under the **More** button in the Time Series Properties dialog.

After expanding the dialog, tick the checkbox to enable Time Shifting of Time Series Data.

There are two ways that Time Series data can be shifted: 1) Using a random starting point, or 2) aligning data years to the simulation start year. The first option randomly samples a starting point in the data set for each realization. The second option is available if the Time Series data is specified using Calendar Time and it simply aligns the data start year to the simulation start year.

To illustrate this, let’s consider the following case:

We have a record of daily temperature from January 10, 1997 until December 31, 2001. We are interested in building a model that runs from Aril 1st, 2010 until March 31st, 2013 in calendar time, and we’d like to use the temperature data from the record.

After importing the record into the Time Series Data table, we have to specify how to use this record in the simulation. (Without Time shifting, Time Series data with no overlap with the simulation time cannot be used in the model.)

If we choose the random starting point with no periodicity option, GoldSim will pick a random date between 1/10/1997 and 12/31/2001 at each realization and match it up with the simulation start time. If GoldSim samples a date close to the end of the data set, the Time Series may run out of data before the simulation end date. In this case, the Time Series will repeat itself from the beginning of the Time Series data.

Figure 1 plots five different realizations of a Time Series output with the above settings. Different dates were sampled as the simulation start time at each realization and ran for three years.**Figure 1: Time Series with random starting point time shifting option with no periodicity**

In some cases, however, the data may be periodic and we may want to sample a particular date of a random year (or particular time of a random day) to match up with the simulation start time. For example, temperature data is annually periodic and we may want to sample April 1st of random years to match up with the simulation start time. (If we have data that repeats itself daily, we should use the diurnal periodicity option instead.)

We can see in the Figure 2 that data is sampled from different dates in the Time Series data set but still keeps the trends of the annual periodicity.**Figure 2: Time Series with random starting point time shifting option with annual periodicity**

Another option is to simply time-shift the time series data year to the simulation start year in a way that the start dates match up. Because the Time Series data set starts at 1/1/1923 and the simulation start time is 1/1/2010, the Time Series will use data from January 1st of 1923 in the data set regardless of realizations.**Figure 3: Time Series with Aligning data year time shifting option**

Another option is to change the Data year to start in with each Monte Carlo realization using an expression in the input field. This will cause GoldSim to perform a time shift on the data set based on the output of our custom expression. In the example below, we start on year 1923 and walk through the time series with each successive year mapped to each successive realization.**Figure 4: Time Series with Shifting on Changing Year**

## Comments

0 comments

Please sign in to leave a comment.