Borrar filtros
Borrar filtros

How to extract data from fints using time and NOT dates

2 visualizaciones (últimos 30 días)
I have stock price intra minute data from 09:15 AM to 3:30 PM for last 5 years with dates in fints format. I want to extract data from 09:45 AM to 3:30 PM for all the dates. How can I do it?

Respuesta aceptada

Walter Roberson
Walter Roberson el 1 de Mzo. de 2018
datevec() and look at the 4th and 5th columns of the results to decide which are in the desired range.
  2 comentarios
Adhish Aggarwal
Adhish Aggarwal el 1 de Mzo. de 2018
Could you elaborate how to do it?
Walter Roberson
Walter Roberson el 1 de Mzo. de 2018
Suppose your fints obj is named FT. Then
DV = datevec(FT.dates);
mask = (DV(:,4) == 9 & DV(:,5) >= 15) | (DV(:,4) >= 10 & DV(:,4) <= 14) | (DV(:,4) == 15 && DV(:,5) <= 30);
extracted_FT = FT(mask);

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB 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