1
$\begingroup$

I am currently working on a project involving stock close prices of some companies. I encounter the problem of missing data in the dataset. For example in the image below, because, I have some null cells. The stock exchange is open from Monday to Friday weekly, so close prices are recorded for 5 consecutive days (yellow and violet).

However, for some weeks (the light blue and dark blue parts), the data is not recorded. My question is how we can deal with such missing data; I found some methods like Last Observation Carried Forward, or interpolation, or even some advanced machine learning algorithms like Random Forest, kNN. I am still confused about which is the right method to use.

My dataset also contains stock close prices from other companies in the same industry, so I wonder if there is a method to predict missing values based on prices from these companies.

Please help me with this. Thanks a lot.

enter image description here

$\endgroup$
1
  • $\begingroup$ Why this data is missing? Is it because of days off or is it incomplete data removed by accident or because it is a free sample? $\endgroup$ Sep 2, 2022 at 7:45

1 Answer 1

2
$\begingroup$

Just like there's no one "best" model, there's no one "correct" way of imputing data. The only way to know for sure is benchmark different candidates as part of a pipelines that includes a prediction model and compare their accuracy/error on a test set.

I'd recommend you start off with some simple imputation methods like interpolation or LOCF to get some baseline, then try some more sophisticated methods and see if it generates any meaningful lift. You may find out it doesn't matter much in the end.

$\endgroup$
1
  • $\begingroup$ Thanks a lot. I will try different methods to figure out which is the most appropriate. $\endgroup$
    – Jay Nguyen
    Sep 2, 2022 at 16:10

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.