1
$\begingroup$

In financial markets, there is a simple problem of trading calendars varying across different countries. For example, Sweden observes Sweden National Day and Norway has Whit Monday. Typically, what happens then is that a time-series in the equity market that was closed for a holiday 'catches up' the next day when the market is open again.

For example:

+-----------------+------------+------------+------------+------------+
| Date            | SEK 1      | SEK 2      | NOK 1      | NOK 2      |
+-----------------+------------+------------+------------+------------+
| Date 1          | + 0.2%     | +0.4%      | +0.3%      | +0.6%      |
| Date 2          | + 1.1%     | +0.7%      | +0.3%      | +2.1%      |
| Date 3          | -3.2%      | -2.9%      | NaN        | NaN        |
| Date 4          | +0.1%      | -0.2%      | -2.8%      | -1.6%      |
+-----------------+------------+------------+------------+------------+

The objective of my model is to adjust the NOK returns for dates 3 and 4 since they have been distorted by the NOK holiday on Date 3. To do this I will use as many good dates as I have, such as date 1 and build a large dataset by randomly dropping out some data, adjusting the following the date and using the dropped out adjustments as the input and obviously I know the supervised output as the real data.

I feel that this would be well suited for a neural network, but I have never constructed one before with dropped out input.

Would it be appropriate to just build network where input data-points that are missing have no impact on the weights for that round? Are there any neural networks (or all) that do this by default?

$\endgroup$

2 Answers 2

2
$\begingroup$

There is no Special reason that neural networks are suitable, if anything it could be too much (depending on the complexities of your time-series).

In any case, you need to deal with you Nan values and if you are looking for a fast model, that imputes that automatically, I would suggest lgbm. Since it will impute NAN with values that reduce the out of fold loss the most (making the highly optimal imputation).

$\endgroup$
1
$\begingroup$

I do not think this bank holidays in your data should be treated as missing or nan. The markets are actually "not trading" on those days. This in itself is an intrinsic signal of the dataset which the model may favor to make better inference. For this reason, it should be explicitly set to zero.

Given big enough dataset and as far as neural networks go, LSTM models can serve you well in terms of capturing those drifts along many others you may not be able to pinpoint. This tutorial may be an excellent starting point of the pros and cons for your use case.

https://towardsdatascience.com/recurrent-neural-network-to-predict-multivariate-commodity-prices-8a8202afd853

$\endgroup$
1
  • $\begingroup$ The need is valid even though you object to it. As an example suppose you have a large position of one index future against another (a spread trade), that are very well correlated. The historical Value at Risk (VaR) will be hugely distorted by days where one market trades and the other does not if you simply report one position as moving a long way and the other as zero change, only for it to 'always' retrace when it opens the next day. For regulatory risk reporting it is important to correct this data. $\endgroup$
    – Attack68
    Aug 13, 2020 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.