缺失行情不是零收益:市场日历与停牌数据怎么处理
先解释为什么没有数据
行情缺失可能来自市场休市、个别证券停牌、没有成交、供应商延迟或采集故障,这些情况不能用同一种方式处理。把所有缺失价格填成零会产生虚假暴跌,而不加区分地沿用上一笔价格,又可能把不可交易的时段当成正常市场。
建立市场与证券两层日历
市场日历说明交易所在哪些日期与时段开放,证券状态则说明具体对象是否上市、停牌或已终止交易。多市场数据还涉及不同节假日和时区。对齐数据时,应先确定研究的决策时间,再判断各市场当时最新可用的行情是哪一条。
前向填充可以用于某些估值展示,但应保留填充标记与距离上次真实报价的时长。用于交易模拟时,必须单独检查是否能够成交。持仓按照旧价格估值,并不意味着研究者能够以该价格卖出,两种含义应严格区分。
异常处理要能审计
为每条缺失或异常记录保留原因、处理方式和原始值。可以按日期统计缺失比例、重复数量、负价格与成交量异常,再识别是否在特定供应商或市场集中出现。整日大量证券缺失时,应优先调查数据链路,而不是假设市场同时没有交易。
收益计算需要检查相邻价格实际间隔。如果一条记录跨越多天,不能把累计变化简单视作普通单日收益参与波动年化。对跨市场特征,也应避免用某市场晚于目标决策时间的收盘价,否则数据对齐会引入未来信息。
在回测报告中列出缺失比例、不可交易样本的处理规则和受影响区间。可比较保守排除、延迟交易等合理方案下的结果,判断结论是否依赖某种填充方式。数据完整性不足时,明确限制比生成一条看似平滑的资金曲线更有价值。
-
Press review: Russia eyes US contacts at G20 as EU rejects security dialogue proposals‘I had a better life in Iran’: Afghan women forced home struggle to rebuildUN chief urges talks on global AI safety framework, warns of historic shift in powerUN chief urges talks on global AI safety framework, warns of historic shift in powerIndia vs New Zealand, 2nd Test: Rahul, Padikkal keep visitors afloat in chase of 41816 Days of Activism: UNHCR warns over deep funding cuts to vital protection work‘I had a better life in Iran’: Afghan women forced home struggle to rebuildGrowing global housing crisis demands fundamental policy shift‘Focker In-Law’ movie review: Ariana Grande is a welcome addition to the familySwimming the Strait of Hormuz: Lewis Pugh on war’s overlooked environmental toll
下一篇:Carnaval 2027: Anitta, Erika Januza e mais musas vão a minidesfiles no Rio
- ·Após última corrida, Marc Marquéz comete gafe ao atender rei da Espanha
- ·Every drop counts: Why the world is gathering in Abu Dhabi to talk about water
- ·Growing global housing crisis demands fundamental policy shift
- ·Gisèle Pelicot’s son: ‘Not being violent is the bare minimum’
- ·WHU-Abschied aus Kleinstadt Vallendar: Was bleibt von einer Hochschulstadt ohne ihre Hochschule? - DER SPIEGEL
- ·From Baltimore to Tajikistan: How a young innovator is taking on the global water crisis
- ·From Baltimore to Tajikistan: How a young innovator is taking on the global water crisis
- ·Every drop counts: Why the world is gathering in Abu Dhabi to talk about water
- ·SpaceX diz que é falsa a notícia sobre uso da Starlink pelo Irã para atacar forças dos EUA
- ·UN chief urges talks on global AI safety framework, warns of historic shift in power
- ·Ukraine: Thousands of homes at risk of confiscation in occupied regions
- ·Yemen: WFP scales up emergency aid as conflict fuels hunger and displacement
- ·Zitronen-Blumenkohl aus dem Ofen - DER SPIEGEL
- ·UN relief chief ‘outraged’ by killing of two MSF workers in Gaza clinic strike
- ·Nadia Murad: ‘Day by day, I took my story back’
- ·‘I had a better life in Iran’: Afghan women forced home struggle to rebuild
- ·Submission of applications for the Eventiada Awards will last until September 30
- ·Yemen: WFP scales up emergency aid as conflict fuels hunger and displacement
- ·Nadia Murad: ‘Day by day, I took my story back’
- ·Measles deaths hit historic low, but US, Mexico and Bolivia lose elimination status
- ·Trier: Weihnachtsmarkt wegen möglicher Gefährdungslage geschlossen - DER SPIEGEL
- ·Five women killed every hour by partners or family members
- ·From Baltimore to Tajikistan: How a young innovator is taking on the global water crisis
- ·UN relief chief ‘outraged’ by killing of two MSF workers in Gaza clinic strike
- ·Wirsingsalat - DER SPIEGEL
- ·Five women killed every hour by partners or family members
- ·分布式光伏分论坛-索比光伏网
- ·Tribunal rejects Argentina’s bid to halt oil drilling off Falkland Islands (Malvinas)
- ·Yemen: WFP scales up emergency aid as conflict fuels hunger and displacement
- ·COP31: Wins, Setbacks and the Road to COP32
- ·Who foots the bill for money lost to phishers
- ·Measles deaths hit historic low, but US, Mexico and Bolivia lose elimination status
- ·Nadia Murad: ‘Day by day, I took my story back’
- ·Measles deaths hit historic low, but US, Mexico and Bolivia lose elimination status
- ·Kiss N Tell, Echoes Of Time, Flight Of Fancy and Doncaster Belle impress
- ·UN chief urges talks on global AI safety framework, warns of historic shift in power
