Luca Spolidoro
04/22/2024, 8:32 PMMonth, Currency Pair, Account, Activity
2022-01-01, EURUSD, 1000 (Cash), 3000
2022-01-01, EURUSD, 2000 (Payables), -1000
2022-01-01, EURUSD, 3000 (Receivables), 5000
2022-02-01, EURUSD, 1000 (Cash), 4900
2022-02-01, EURUSD, 2000 (Payables), -3000
2022-02-01, EURUSD, 3000 (Receivables), 2000
2022-03-01, EURUSD, 1000 (Cash), -2000
2022-03-01, EURUSD, 2000 (Payables), -10000
2022-03-01, EURUSD, 3000 (Receivables), 19000
2022-01-01, USDCAD, 1000 (Cash), 4500
2022-01-01, USDCAD, 2000 (Payables), -1500
2022-01-01, USDCAD, 3000 (Receivables), 7500
2022-02-01, USDCAD, 1000 (Cash), 7350
2022-02-01, USDCAD, 2000 (Payables), -4500
2022-02-01, USDCAD, 3000 (Receivables), 3000
2022-03-01, USDCAD, 1000 (Cash), -3000
2022-03-01, USDCAD, 2000 (Payables), -15000
2022-03-01, USDCAD, 3000 (Receivables), 28500
2022-01-01, USDINR, 1000 (Cash), -1500
2022-01-01, USDINR, 2000 (Payables), 500
2022-01-01, USDINR, 3000 (Receivables), -2500
2022-02-01, USDINR, 1000 (Cash), -2450
2022-02-01, USDINR, 2000 (Payables), 1500
2022-02-01, USDINR, 3000 (Receivables), -1000
2022-03-01, USDINR, 1000 (Cash), 1000
2022-03-01, USDINR, 2000 (Payables), 5000
2022-03-01, USDINR, 3000 (Receivables), -9500
The ds column is Month, and the y column is Activity.
The main unique_id column is Currency Pair, but I also have the Account column that distinguishes the Activity.
To use the TimeGPT APIs, I tried to pivot the table on Account, and have something like this:
Month, Currency Pair, 1000 (Cash), 2000 (Payables), 3000 (Receivables)
2022-01-01, EURUSD, 3000, -1000, 5000
2022-01-01, USDCAD, 4500, -1500, 7500
2022-01-01, USDINR, -1500, 500, -2500
2022-02-01, EURUSD, 4900, -3000, 2000
2022-02-01, USDCAD, 7350, -4500, 3000
2022-02-01, USDINR, -2450, 1500, -1000
2022-03-01, EURUSD, -2000, -10000, 19000
2022-03-01, USDCAD, -3000, -15000, 28500
2022-03-01, USDINR, 1000, 5000, -9500
I tried to forecast the “1000 (Cash)” column:
forecast = nixtla_client.forecast(df=df, time_col='Month', id_col='Currency Pair', target_col='1000 (Cash)', h=3)
but it doesn’t take in consideration the other two “_2000 (Payables)”_, “_3000 (Receivables)_” for calculating the forecast, nor it adds them in the output:
unique_id, ds, TimeGPT
EURUSD, 2022-04-01, -1397.99
EURUSD, 2022-05-01, -345.228
EURUSD, 2022-06-01, 1201.812
USDCAD, 2022-04-01, -2096.98
USDCAD, 2022-05-01, -517.842
USDCAD, 2022-06-01, 1802.718
USDINR, 2022-04-01, -165.96
USDINR, 2022-05-01, -698.591
USDINR, 2022-06-01, -869.486
What can you recommend for my scenario where the value to forecast could depend on N other columns (that I have in the history), and the model automatically infers the relationships/weights, forecasting them all at once?
I see in the TimeGPT forecast function definition, the id_col
and target_col
are a single string, and I couldn't find any way to provide multiple ones. I see there is a way to add exogenous variables, but they all need to be future values, while I need to forecast them.Marco
04/22/2024, 8:52 PMLuca Spolidoro
04/22/2024, 9:04 PMCash = Receivables - Payables +- DELTA
I would like the model to infer that considering all the values at the same time, not just the individual series.
Also the numbers in this sample a just randomly generated, they do not represent the real data.Marco
04/22/2024, 9:18 PMLuca Spolidoro
04/23/2024, 1:23 PMid_col
and target_col
are a single string, and I couldn't find any way to provide multiple ones.
Should I merge Currency Pair
with Account
column, and pass that as id_col
?Marco
04/23/2024, 1:26 PMLuca Spolidoro
04/23/2024, 11:13 PMunique_id
column, and the forecast outputs everything as expected, and you are saying that the prediction will take into consideration the potential inter-relationships / weights between the various series. That's awesome!
I have another question: I see in the Azure AI page that the possibility to deploy your model in a private Azure environment is coming soon. We would like to use TimeGPT to forecast private company data, and we need a private environment before we have permission to try anything. How soon can we expect Microsoft to offer your model in Azure AI Studio?Marco
04/24/2024, 12:45 PMCristian (Nixtla)
04/24/2024, 4:32 PMX_df
dataframe for TimeGPT to consider them.
The model only currently supports exogenous variables for which you have data on the forecasting horizon (future variables). You can incorporate them in two stages. First, you forecast the exogenous covariates with TimeGPT. Second, pass the forecasts to the X_df
parameter of the forecast method. We are working on adding historic variables as well.Cristian (Nixtla)
04/24/2024, 4:33 PMLuca Spolidoro
04/24/2024, 4:56 PMThe model only currently supports exogenous variables for which you have data on the forecasting horizon (future variables)Ouch, all the series may be interdependent... I would be required to arbitrary choose which ones may not be dependent, then forecast them, and use that forecast as exogeneous covariates with
x_df
parameter, which is not ideal for my scenario.
I see that your NeuralForecast supports *historic* exogenous variables, is that something you would consider adding to TimeGPT?
Also, could you please tell me about Azure AI?Cristian (Nixtla)
04/24/2024, 4:58 PMLuca Spolidoro
04/24/2024, 5:06 PM