Bondya commited on
Commit
c8469a7
·
verified ·
1 Parent(s): e290282

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +12 -14
index.html CHANGED
@@ -540,9 +540,9 @@
540
  }
541
  }
542
 
543
- // 计算资本利得区间(基于正态分布)
544
  function calculateCapitalGainRange(period) {
545
- // 确定波段次数
546
  let cycles;
547
  switch(period) {
548
  case 'SHORT': cycles = 1; break; // 0-3个月:1次
@@ -551,23 +551,20 @@
551
  default: cycles = 1;
552
  }
553
 
554
- // 单次波段参数:标准正态分布,±15bp波动(标准差15bp)
555
- const singleStd = 15; // 15bp标准差
556
- const singleMean = 0; // 均值为0,表示对称波动
557
 
558
  // 年化分布参数(n次独立同分布的和)
559
  const annualMean = singleMean * cycles;
560
  const annualStd = singleStd * Math.sqrt(cycles);
561
 
562
- // 计算50%-80%交易员的收益区间25百分位75百分位)
563
- const p25 = normalQuantile(0.25, annualMean, annualStd);
564
- const p75 = normalQuantile(0.75, annualMean, annualStd);
565
 
566
  return {
567
- lower: p25 / 100, // 转换为百分
568
- upper: p75 / 100,
569
- mean: annualMean / 100,
570
- std: annualStd / 100
571
  };
572
  }
573
 
@@ -745,6 +742,7 @@
745
  const bondResult = calculateBaseReturn();
746
  const capGain = calculateCapitalGainRange(period);
747
 
 
748
  const totalLower = bondResult.baseReturn + capGain.lower;
749
  const totalUpper = bondResult.baseReturn + capGain.upper;
750
 
@@ -939,13 +937,13 @@
939
 
940
  <div style="margin-top: 30px; padding: 20px; background: #f0f8ff; border-radius: 8px;">
941
  <h3>💡 计算说明</h3>
942
- <p><strong>资本利得模型:</strong>基于标准正态分布(±15bp波动),不同期限对应不同波段次数:</p>
943
  <ul style="margin-left: 20px; margin-top: 5px;">
944
  <li>短期(0-3个月):1次波段</li>
945
  <li>中期(3-6个月):1.5次波段</li>
946
  <li>长期(6-12个月):3次波段</li>
947
  </ul>
948
- <p><strong>展示区间:</strong>50%-80%交易员收益区间(第25-75百分位)</p>
949
  <p><strong>资产预期:</strong>${result.strategy === '固收+策略' ?
950
  `采用${result.expectation}预期,${result.asset}指数预测区间为${result.assetReturnRange}` :
951
  '纯债策略主要依赖票息收入和资本利得'}</p>
 
540
  }
541
  }
542
 
543
+ // 计算资本利得区间(基于正态分布,第50-80百分位
544
  function calculateCapitalGainRange(period) {
545
+ // 确定波段次数(按照我们讨论的逻辑)
546
  let cycles;
547
  switch(period) {
548
  case 'SHORT': cycles = 1; break; // 0-3个月:1次
 
551
  default: cycles = 1;
552
  }
553
 
554
+ // 单次波段参数:正态分布 N(0, σ)σ=18bp
555
+ const singleStd = 18; // 18bp标准差,基于我们讨论的参数
556
+ const singleMean = 0; // 均值为0,第50百分位不亏钱
557
 
558
  // 年化分布参数(n次独立同分布的和)
559
  const annualMean = singleMean * cycles;
560
  const annualStd = singleStd * Math.sqrt(cycles);
561
 
562
+ // 计算80百分位因为我们取50-80百分位区间,下限为0,上限为80百分位)
563
+ const p80 = normalQuantile(0.8, annualMean, annualStd);
 
564
 
565
  return {
566
+ lower: 0, // 第50百分位为0
567
+ upper: p80 / 100 // 转换为百分比
 
 
568
  };
569
  }
570
 
 
742
  const bondResult = calculateBaseReturn();
743
  const capGain = calculateCapitalGainRange(period);
744
 
745
+ // 总收益率区间 = 基础收益率 + 资本利得区间
746
  const totalLower = bondResult.baseReturn + capGain.lower;
747
  const totalUpper = bondResult.baseReturn + capGain.upper;
748
 
 
937
 
938
  <div style="margin-top: 30px; padding: 20px; background: #f0f8ff; border-radius: 8px;">
939
  <h3>💡 计算说明</h3>
940
+ <p><strong>资本利得模型:</strong>基于正态分布N(0, 18bp),不同期限对应不同波段次数,计算第50-80百分位交易员收益区间:</p>
941
  <ul style="margin-left: 20px; margin-top: 5px;">
942
  <li>短期(0-3个月):1次波段</li>
943
  <li>中期(3-6个月):1.5次波段</li>
944
  <li>长期(6-12个月):3次波段</li>
945
  </ul>
946
+ <p><strong>资本利得区间:</strong>下限为0bp(第50百分位不亏钱,上限为第80百分位值</p>
947
  <p><strong>资产预期:</strong>${result.strategy === '固收+策略' ?
948
  `采用${result.expectation}预期,${result.asset}指数预测区间为${result.assetReturnRange}` :
949
  '纯债策略主要依赖票息收入和资本利得'}</p>