-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreport_template.html
More file actions
307 lines (282 loc) · 9.57 KB
/
report_template.html
File metadata and controls
307 lines (282 loc) · 9.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2025年全国期货市场月度分析报告</title>
<style>
/* 重置和基础样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.7;
color: #333;
background-color: #f9f9f9;
padding: 20px;
}
/* 容器,限制最大宽度,居中显示 */
.container {
max-width: 1400px;
margin: 0 auto;
background: white;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
border-radius: 12px;
overflow: hidden;
}
/* 头部样式 */
header {
background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
color: white;
padding: 30px 40px;
text-align: center;
}
header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
font-weight: 600;
}
header p {
font-size: 1.1rem;
opacity: 0.9;
}
/* 主内容区 */
main {
padding: 40px;
}
/* 标题样式 */
h2 {
color: #2c3e50;
font-size: 1.8rem;
margin: 2.5rem 0 1.5rem 0;
padding-bottom: 10px;
border-bottom: 2px solid #3498db;
position: relative;
}
h2::after {
content: '';
position: absolute;
left: 0;
bottom: -2px;
width: 100px;
height: 2px;
background: #e74c3c;
}
h3 {
color: #2980b9;
font-size: 1.4rem;
margin: 1.8rem 0 1rem 0;
font-weight: 600;
}
/* 图表容器优化 */
.figure {
margin: 2.5rem auto;
max-width: 95%;
background: white;
border-radius: 10px;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
border: 1px solid #eaeaea;
}
.figure:hover {
transform: translateY(-4px);
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}
/* 图片自适应 */
.figure img {
width: 100%;
height: auto;
display: block;
border-bottom: 1px solid #eee;
}
/* 图表标题/说明 */
.figure-caption {
padding: 16px;
background: #fafafa;
font-size: 0.95rem;
color: #555;
line-height: 1.5;
}
.figure-caption strong {
color: #2c3e50;
}
/* 表格样式 */
table {
width: 100%;
margin: 2rem 0;
border-collapse: collapse;
background: white;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
th, td {
text-align: left;
padding: 14px 16px;
border-bottom: 1px solid #eee;
}
th {
background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
color: white;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
tr:nth-child(even) {
background-color: #f8f9fa;
}
tr:hover {
background-color: #e3f2fd;
}
/* 解读段落 */
.insight {
font-size: 1.1rem;
line-height: 1.8;
color: #2c3e50;
background: #e8f5fe;
border-left: 4px solid #2575fc;
padding: 16px 20px;
margin: 1.5rem 0;
border-radius: 0 8px 8px 0;
}
/* 响应式设计 */
@media (max-width: 768px) {
.container {
margin: 10px;
border-radius: 8px;
}
header {
padding: 20px;
}
header h1 {
font-size: 2rem;
}
main {
padding: 20px;
}
.figure {
margin: 1.5rem auto;
max-width: 100%;
}
h2 {
font-size: 1.6rem;
}
h3 {
font-size: 1.3rem;
}
table, th, td {
font-size: 0.9rem;
padding: 10px;
}
}
/* 小屏幕下的表格滚动 */
@media (max-width: 576px) {
.table-container {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>2025年全国期货市场月度分析报告</h1>
<p><strong>生成日期:</strong>{{ report_date }}</p>
</header>
<main>
<h2>一、总体情况</h2>
<h3>1.1 全国市场趋势</h3>
<div class="figure">
<img src="national_volume_trend.png" alt="全国成交量趋势图">
<div class="figure-caption">
<strong>数据来源:</strong>中国期货业协会
</div>
</div>
<div class="insight">
过去几个月,全国期货市场成交量整体呈现<strong>先上升后回落</strong>的趋势,在6月达到峰值后有所回调。成交额则保持了<strong>稳健的增长</strong>态势,表明尽管交易活跃度在高位盘整,但市场资金规模仍在持续扩大。
</div>
<h3>1.2 市场份额演变</h3>
<div class="figure">
<img src="exchange_shares_stacked.png" alt="交易所市场份额趋势图">
<div class="figure-caption">
<strong>数据来源:</strong>中国期货业协会
</div>
</div>
<div class="insight">
上期所和郑商所的市场份额保持相对稳定,而<strong>广期所</strong>的市场份额从1月的4.6%稳步增长至8月的5.34%,显示出强劲的增长势头和市场吸引力。
</div>
<h2>二、交易所分析</h2>
<h3>2.1 各交易所表现</h3>
<div class="table-container">
<table>
<thead>
<tr>
<th>交易所</th>
{% for col in exchange_table_data.columns[1:] %}
<th>{{ col }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in exchange_table_data %}
<tr>
<td>{{ row['交易所'] }}</td>
{% for col in exchange_table_data.columns[1:] %}
<td>{{ row[col] if col in row else '...' }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
<h2>三、品种分析</h2>
<!-- 上期所 -->
<h3>3.1 上海期货交易所</h3>
<div class="figure">
<img src="上海期货交易所_top5_volume_trend.png" alt="上海期货交易所前五名品种趋势">
</div>
<!-- 郑商所 -->
<h3>3.2 郑州商品交易所</h3>
<div class="figure">
<img src="郑州商品交易所_top5_volume_trend.png" alt="郑州商品交易所前五名品种趋势">
</div>
<!-- 大商所 -->
<h3>3.3 大连商品交易所</h3>
<div class="figure">
<img src="大连商品交易所_top5_volume_trend.png" alt="大连商品交易所前五名品种趋势">
</div>
<!-- 中金所 -->
<h3>3.4 中国金融期货交易所</h3>
<div class="figure">
<img src="中国金融期货交易所_top5_volume_trend.png" alt="中国金融期货交易所前五名品种趋势">
</div>
<!-- 广期所 -->
<h3>3.5 广州期货交易所</h3>
<div class="figure">
<img src="广州期货交易所_top5_volume_trend.png" alt="广州期货交易所前五名品种趋势">
</div>
<h3>3.6 热门品种趋势</h3>
<div class="figure">
<img src="shfe_commodity_pie.png" alt="上海期货交易所成交额构成">
<div class="figure-caption">
<strong>数据来源:</strong>中国期货业协会
</div>
</div>
<div class="insight">
9月上海期货交易所成交额前三甲为:<strong>黄金、白银、原油</strong>,三者合计贡献了近一半的成交额。
</div>
<h2>四、持仓分析</h2>
<h3>4.1 持仓量趋势</h3>
<p>由于数据限制,此部分暂未生成。</p>
<footer style="text-align: center; padding: 30px 0; color: #777; font-size: 0.9rem; border-top: 1px solid #eee;">
数据来源:中国期货业协会 | 技术支持:大投研体系
</footer>
</main>
</div>
</body>
</html>