本页面提供的是上一版软件的文档。当前版本中已删除对应的英文页面。
fts2timetable
将金融时间序列对象 (fints
) 转换为时间表对象
说明
将 TT
= fts2timetable(FTS
)M
× N
fints
对象转换为 M
× N
MATLAB® timetable
对象 (TT
)。fints
对象中的日期时间信息变为 TT
时间向量,而 fints
对象中的其余变量变为 TT
中的变量。fints
描述属性 (DESC
) 将映射到 TT.Properties.Description
。fints
频率指示符属性 (FREQ
) 未使用并从输出 TT
中移除。有关详细信息,请参阅 将金融时间序列对象 fints 转换为时间表。
示例
将 fints
对象转换为 timetable
对象并绘制金融数据图
加载金融数据。
load SimulatedStockValues
Warning: FINTS is not recommended. Use TIMETABLE instead. For more information, see <a href="matlab:web(fullfile(docroot, 'finance/convert-from-fints-to-timetables.html'))">Convert Financial Time Series Objects (fints) to Timetables</a>.
将 fints
对象转换为 timetable
对象。
TMW = fts2timetable(TMW_fts); TMW.Properties
ans = TimetableProperties with properties: Description: 'Simulated stock OHLCV data.' UserData: [] DimensionNames: {'Time' 'Variables'} VariableNames: {'Open' 'High' 'Low' 'Close' 'Volume'} VariableDescriptions: {} VariableUnits: {} VariableContinuity: [] RowTimes: [1000×1 datetime] StartTime: 31-Aug-2012 SampleRate: NaN TimeStep: NaN CustomProperties: No custom properties are set. Use addprop and rmprop to modify CustomProperties.
可视化金融数据。
ma1 = movavg(TMW,'exponential',14); ma2 = movavg(TMW,'exponential',26); selctRange = 70:120; figure; plot(ma1.Time(selctRange), ma1.Close(selctRange), ... ma2.Time(selctRange), ma2.Close(selctRange)); ax = gca; hold on % Plot on a target axis candle(ax, TMW(selctRange,:)); legend(ax, '14-day MA', '26-day MA', 'Price') ylabel(ax, 'Price') xlabel(ax, 'Date') title(ax, 'TMW Simulated Stock Prices') hold off
输入参数
FTS
— 金融时间序列对象
对象
金融时间序列对象,使用 M
× N
fints
对象指定。
数据类型: object
输出参数
TT
— 时间表
对象
时间表,以 M
× N
对象形式返回。
版本历史记录
在 R2018a 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)