any convenient way to plot stock trading data without after & pre market data

4 visualizaciones (últimos 30 días)
Hi:
I have stock market data and trying to plot them, the problem I'm facing is that, I want to look at the stock intraday data in several days together. I only want to look at the price change during trading hours (9:30 am to 4:00 pm), due to the time gap (after-market hours & premarket hours) between two trading days, the plot contains a large gap as shown below, which is very low quality.
is there any convenient way to visualize the intraday data for serveral continuous days?
the test data is uploaded.
Thanks!
Yu

Respuesta aceptada

Angelo Yeo
Angelo Yeo el 20 de Jul. de 2023
I'm not sure if there are any off-the-shelf ways or any equivalent easy ways to break time axis. This is because the time values are what they are.
I can only think of changing xtick labels after plotting the only price values.
websave("test.mat","https://kr.mathworks.com/matlabcentral/answers/uploaded_files/1438133/test.mat");
load("test.mat");
plot(test.price)
newTicks = floor(linspace(1, height(test), 4)); % 4 is the number of xticks to use.
xlim([1, height(test)]);
xticks(newTicks)
xticklabels(cellstr(test.dateTime(newTicks),'MMM dd, HH:mm'))
  2 comentarios
Yu Li
Yu Li el 20 de Jul. de 2023
HI:
thank you. yes I agree, the datetime is what it is, so probably this is the best workaround so far.
If Mathworks can consider a new feature - to display the data with specified axis range in figures, that will be great.
Thanks!
Yu
Angelo Yeo
Angelo Yeo el 20 de Jul. de 2023
Hi Yu,
Let me report your request internally. In general, if you want to request an enhancement, you can contact Technical Support.
https://www.mathworks.com/support/contact_us.html?s_tid=hp_ff_s_support

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Transaction Cost Analysis en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by