필터 지우기
필터 지우기

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

조회 수: 4 (최근 30일)
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

채택된 답변

Angelo Yeo
Angelo Yeo 2023년 7월 20일
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
Yu Li
Yu Li 2023년 7월 20일
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 2023년 7월 20일
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Transaction Cost Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by