From 59e07665e84705fbecdf401fa548f7966206ae4e Mon Sep 17 00:00:00 2001 From: workpc Date: Tue, 5 Nov 2024 16:13:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A2=84=E6=B5=8B=E5=9B=BE?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/nerulforcastmodels.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/models/nerulforcastmodels.py b/models/nerulforcastmodels.py index c988a45..471b1b1 100644 --- a/models/nerulforcastmodels.py +++ b/models/nerulforcastmodels.py @@ -550,13 +550,16 @@ def brent_export_pdf(num_indicators=475,num_models=21, num_dayindicator=202,inpu ### 预测结果 content.append(Graphs.draw_little_title('一、预测结果:')) - # 添加图片 - # 找出后缀是历史价格-预测值.png的图片 - # import glob - # imgs = glob.glob(os.path.join(dataset,'*历史价格-预测值.png')) - # for img in imgs: - # content.append(Graphs.draw_img(img)) + # 添加历史走势及预测价格的走势图片 content.append(Graphs.draw_img(os.path.join(dataset,'历史价格-预测值.png'))) + content.append(Graphs.draw_text('图示说明:')) + content.append(Graphs.draw_text('1. 确定波动率置信区间:统计近60个交易日的真实价格波动率,找出在 10% ,90% 的分位值作为波动率置信区间;')) + content.append(Graphs.draw_text('2. 确定通道上界:在所有模型的预测结果中 <= 前一天真实价格 乘以 90%置信')) + content.append(Graphs.draw_text('3. 确定通道下界:在所有模型的预测结果中 >= 前一天真实价格 乘以 10%置信')) + content.append(Graphs.draw_text('4. 预测结果没有真实值作为参考依据,通道上界取近20个交易日内预测在上界值的模型对应的预测值,通道下界同理;')) + content.append(Graphs.draw_text('5. 预测结果选用近20个交易日内,最多接近真实值的模型的预测值对应的预测结果;')) + content.append(Graphs.draw_text('6. 预测结果在通道外的,代表最接近真实值的预测结果不在置信波动范围内。')) + # 取df中y列为空的行 import pandas as pd