Info
This question is closed. Reopen it to edit or answer.
Align OHLC datasets by date column
1 view (last 30 days)
Show older comments
Hello everyone...I have multiple datasets I am trying to align. Each dataset has 6 columns('Date', 'Open', 'High', 'Low', 'Close', 'Volume') and each varies in length. I would like to create new datasets of the same length aligning by all unique dates available from each dataset.
What I have...
if true
% code
end
Dataset_ICDAX
Date Open High Low Close Volume
7.3139e+005 9.89 9.89 9.89 9.89 0
7.3139e+005 9.9 9.9 9.9 9.9 0
7.3141e+005 10.04 10.04 10.04 10.04 0
Dataset_CL
Date Open High Low Close Volume
7.3138e+005 25.42 26.03 25.2 25.94 77902
7.3138e+005 26.2 26.5 26.05 26.09 62018
7.3139e+005 25.9 26.15 25.35 25.43 54329
7.3139e+005 25.4 25.97 25.22 25.31 58779
7.314e+005 27.02 27.15 26.63 26.77 64641
7.314e+005 26.77 26.85 26.38 26.8 62869
7.3141e+005 26.35 26.38 25.9 26.07 75606
What I want...
if true
% code
end
Dataset_NewICDAX
Date Open High Low Close Volume
7.3138e+005 NaN NaN NaN NaN NaN
7.3138e+005 NaN NaN NaN NaN NaN
7.3139e+005 9.89 9.89 9.89 9.89 0
7.3139e+005 9.9 9.9 9.9 9.9 0
7.314e+005 NaN NaN NaN NaN NaN
7.314e+005 NaN NaN NaN NaN NaN
7.3141e+005 10.04 10.04 10.04 10.04 0
How would you guys do this? I have tried various approaches("join", merging functions) to no avail(more than likely due to my inexperience).
I appreciate the help.
0 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!