MFE Financial toolbox related question
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to use Realised variance from MFE Financial toolbox - Kevin Shephard.
The function is - function [rv,rvSS]=realized_variance(price,time,timeType,samplingType,samplingInterval,subsamples)
I have put the price matrix as 1*79, time matrix as 1*79, samplingType as 'CalendarTime' and subsamples as 5.
The price matrix is just the high frequency prices of the stock.
Time matrix is in the form of unix code and has many dates.
I want to calculate the realised variance at a sampling frequency of 5 min. I have created a function for the conversion of unix code to date/number format-
function dn = unixtime_to_datenum( unix_time )
dn = unix_time/86400 + 719529;
end
I am not able to convert these datenum into 'wall', 'seconds', 'unit' for different dates with different timings and then use it in this code. (Please refer attached excel sheet)
Could someone help me with this?
0 commentaires
Réponses (1)
Maadhav Akula
le 13 Déc 2019
From your question, I think the 'unit' format refers to Normalization of time, if that is the case you can use the unixtime format itself for Normalization as follows:
normalized_time = (unix_time - min(unix_time))/(max(unix_time) - min(unix_time));
Hope this helps!
0 commentaires
Voir également
Catégories
En savoir plus sur Dates and Time dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!