![]() ![]() Ret_adjusted_prices: The arithmetic or log return (see input type_return) for the adjusted stock prices Price_adjusted: The stock price adjusted for corporate events such as splits, dividends and others – this is usually what you want/need for studying stocks as it represents the real financial performance of stockholders Volume: The financial volume of the day/period, in the unit of the exchange Price_close: The close/last price of the day/period Price_high: The highest price of the day/period Price_open: The opening price of the day/period Ref_date: The reference day (this can also be year/month/week when using argument freq_data) ![]() Ticker: The requested tickers (ids of stocks) The returned data contains the following columns: For example, price data for GM (NASDAQ/US) is measured in dollars, while price data for PETR3.SA (B3/BR) is measured in Reais (Brazilian currency). All price data is measured at the unit of the financial exchange. The main function of the package, yfR::yf_get, returns a dataframe with the financial data. Format = "dd-mm-yyyy" figure, plot ( tscomb ) legend ( symbols, 'interpreter', 'none', 'Location', 'best' ) covMat = corrcoef ( marketData ) covMat ( eye ( 8 ) = 1 ) = 0 figure, heatmap ( covMat, 'Colormap', parula ( 3 ), 'ColorbarVisible', 'on' ) ax = gca ax. std ( marketData ) normalizedPrice = normalizedPrice - normalizedPrice ( 1 ,: ) tscomb = timeseries ( normalizedPrice ) tscomb. Data end marketData ( isnan ( marketData ) ) = 0 % In case resample ( ) introduced NaNs normalizedPrice = ( marketData - mean ( marketData ) ). Date ) ) tsout = resample ( ts ( k ), ts ( 1 ). ![]() Clear marketData initDate = datetime ( addtodate ( datenum ( today ) ,- 1, 'year' ), 'ConvertFrom', 'datenum' ) symbols =, initDate ) ts ( k ) = timeseries ( data. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |