siat 3.4.6__py3-none-any.whl → 3.4.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
siat/common.py CHANGED
@@ -1541,6 +1541,8 @@ def print_progress_percent(current,total,steps=5,leading_blanks=2):
1541
1541
  total:总个数
1542
1542
  steps:分成几个进度点显示
1543
1543
  leading_blanks:前置空格数
1544
+
1545
+ 注意:此函数起点计数应为0,放在循环体尾部。
1544
1546
  """
1545
1547
 
1546
1548
  #间隔区间,最小为1
siat/grafix.py CHANGED
@@ -370,8 +370,9 @@ def plot2_line2(df1,ticker1,colname1,label1, \
370
370
  date_range=False,date_freq=False,date_fmt='%Y-%m-%d', \
371
371
  color1='red',color2='blue',facecolor='whitesmoke'):
372
372
  """
373
- 注意:可能有问题,左纵坐标轴和横坐标轴标记可能发生重叠!
373
+ 注意:可能有bug,twinx=True时左纵坐标轴和横坐标轴标记可能发生重叠!!!暂不建议使用
374
374
  facecolor不起作用
375
+ 目前的解决方案:改用函数plot_line2
375
376
 
376
377
  功能:绘制两个证券的折线图。如果power=0不绘制趋势图,否则绘制多项式趋势图
377
378
  假定:数据表有索引,且已经按照索引排序
siat/option_china.py CHANGED
@@ -2032,7 +2032,7 @@ def fin_option_risk_sse(option,maturity,exercise,trade_date,printout=True):
2032
2032
  """
2033
2033
 
2034
2034
  #初始检查:期权名称
2035
- optionlist=["50ETF","300ETF","500ETF"]
2035
+ optionlist=["50ETF","300ETF","500ETF","科创50","科创板50"]
2036
2036
  if not (option in optionlist):
2037
2037
  print(" #Error(fin_option_risk_sse): option not found in SSE for",option)
2038
2038
  return None
@@ -2061,13 +2061,15 @@ def fin_option_risk_sse(option,maturity,exercise,trade_date,printout=True):
2061
2061
 
2062
2062
  df['direction']=df['CONTRACT_ID'].apply(lambda x: x[6:7])
2063
2063
  df['underlying']=df['CONTRACT_ID'].apply(lambda x: x[:6])
2064
- df['ETF end']=df['CONTRACT_SYMBOL'].apply(lambda x: x.find('ETF')+3)
2065
- df['option']=df.apply(lambda x: x['CONTRACT_SYMBOL'][:x['ETF end']],axis=1)
2064
+
2065
+ df['ETF end']=df['CONTRACT_SYMBOL'].apply(lambda x: x.find(''))
2066
+ df['ETF end']=df.apply(lambda x: x['CONTRACT_SYMBOL'].find('沽') if x['ETF end'] < 0 else x['ETF end'],axis=1)
2067
+ df['option']=df.apply(lambda x: x['CONTRACT_SYMBOL'][:x['ETF end']],axis=1)
2068
+
2066
2069
  df['exercise']=df['CONTRACT_ID'].apply(lambda x: float(x[12:]))
2067
2070
 
2068
2071
  #进一步检查:到期日
2069
2072
  df['maturity']=df['CONTRACT_ID'].apply(lambda x: x[7:11])
2070
- #进一步检查:到期日
2071
2073
  if not (maturity in list(df['maturity'])):
2072
2074
  print(" #Error(fin_option_risk_sse): maturity not found in SSE for",maturity)
2073
2075
 
@@ -2105,14 +2107,15 @@ def fin_option_risk_sse(option,maturity,exercise,trade_date,printout=True):
2105
2107
  & (df2['maturity']==maturity) & (df2['exercise']==exercise)]
2106
2108
  #综合检查:全部条件
2107
2109
  if len(df9) == 0:
2108
- print(" #Error(fin_option_risk_sse): options not available combining",option,maturity,exercise)
2110
+ print(" #Warning(fin_option_risk_sse): options not available combining",option,maturity,exercise)
2109
2111
  df9tmp=df2[(df2['option']==option) & (df2['maturity']==maturity)]
2110
2112
  execlist=list(df9tmp['exercise'])
2111
2113
  exerciselist=[]
2112
2114
  for e in execlist:
2113
2115
  eint=int(e)
2114
2116
  exerciselist=exerciselist+[eint]
2115
- print(" Exercises available under",option,maturity,"\b:",exerciselist)
2117
+ # 消除重复并排序
2118
+ print(" Exercises available under",option,maturity,"\b:",sorted(list(set(exerciselist))))
2116
2119
  return None
2117
2120
 
2118
2121
  df9C=df9[(df9['direction']=='C')]
@@ -2132,7 +2135,7 @@ def fin_option_risk_sse(option,maturity,exercise,trade_date,printout=True):
2132
2135
  rhoP=df9P['rho'][0]
2133
2136
  impvolP=df9P['implied volatility'][0]
2134
2137
 
2135
- print("\n===== 上交所金融期权风险指标 =====\n")
2138
+ print("\n===== 期权风险指标 =====\n")
2136
2139
  print("***期权:",option,"\b,交易日期:",trade_date)
2137
2140
  print("标的物代码:",underlying,"\b,到期时间:",maturity,"\b,行权股指点位:",exercise)
2138
2141
 
@@ -2155,15 +2158,17 @@ if __name__=='__main__':
2155
2158
  #==============================================================================
2156
2159
  if __name__=='__main__':
2157
2160
  option='50ETF'
2158
- option='300ETF'
2159
- maturity='2306'
2161
+ maturity='2412'
2160
2162
  exercise=3000
2163
+
2164
+ option='300ETF'
2161
2165
  exercise=3500
2162
- trade_date='2023-5-17'
2166
+
2167
+ trade_date='2024-9-10'
2163
2168
  printout=True
2164
2169
 
2165
2170
  def fin_option_risk_sse2(option,maturity,exercise,trade_date, \
2166
- printout=True,loc='best'):
2171
+ printout=True,loc='best',facecolor='whitesmoke'):
2167
2172
  """
2168
2173
  功能:显示指定上交所金融期权的风险指标
2169
2174
  option: 期权名称
@@ -2173,7 +2178,7 @@ def fin_option_risk_sse2(option,maturity,exercise,trade_date, \
2173
2178
  """
2174
2179
 
2175
2180
  #初始检查:期权名称
2176
- optionlist=["50ETF","300ETF","500ETF"]
2181
+ optionlist=["50ETF","300ETF","500ETF","科创50","科创板50"]
2177
2182
  if not (option in optionlist):
2178
2183
  print(" #Error(fin_option_risk_sse): option not found in SSE for",option)
2179
2184
  return None
@@ -2203,15 +2208,20 @@ def fin_option_risk_sse2(option,maturity,exercise,trade_date, \
2203
2208
 
2204
2209
  df['direction']=df['CONTRACT_ID'].apply(lambda x: x[6:7])
2205
2210
  df['underlying']=df['CONTRACT_ID'].apply(lambda x: x[:6])
2206
- df['ETF end']=df['CONTRACT_SYMBOL'].apply(lambda x: x.find('ETF')+3)
2211
+
2212
+ df['ETF end']=df['CONTRACT_SYMBOL'].apply(lambda x: x.find('购'))
2213
+ df['ETF end']=df.apply(lambda x: x['CONTRACT_SYMBOL'].find('沽') if x['ETF end'] < 0 else x['ETF end'],axis=1)
2207
2214
  df['option']=df.apply(lambda x: x['CONTRACT_SYMBOL'][:x['ETF end']],axis=1)
2215
+
2208
2216
  df['exercise']=df['CONTRACT_ID'].apply(lambda x: float(x[12:]))
2209
2217
 
2218
+ #筛选指定的期权
2219
+ df=df[df['option']==option]
2220
+
2210
2221
  #进一步检查:到期日
2211
2222
  df['maturity']=df['CONTRACT_ID'].apply(lambda x: x[7:11])
2212
- #进一步检查:到期日
2213
2223
  if not (maturity in list(df['maturity'])):
2214
- print(" #Error(fin_option_risk_sse): maturity not found in SSE for",maturity)
2224
+ print(" #Warning(fin_option_risk_sse): maturity not found in SSE for",maturity)
2215
2225
 
2216
2226
  df_maturity=df[(df['option']==option) & (df['exercise']==exercise)]
2217
2227
  maturitylist=list(set(list(df_maturity['maturity'])))
@@ -2221,7 +2231,7 @@ def fin_option_risk_sse2(option,maturity,exercise,trade_date, \
2221
2231
 
2222
2232
  #进一步检查:行权点位
2223
2233
  if not (exercise in list(df['exercise'])):
2224
- print(" #Error(fin_option_risk_sse): exericse point not found in SSE for",exercise)
2234
+ print(" #Warning(fin_option_risk_sse): exericse point not found in SSE for",exercise)
2225
2235
 
2226
2236
  df_exercise=df[(df['option']==option) & (df['maturity']==maturity)]
2227
2237
  exerciselist=list(set(list(df_exercise['exercise'])))
@@ -2230,7 +2240,7 @@ def fin_option_risk_sse2(option,maturity,exercise,trade_date, \
2230
2240
  print(" Available exercises:",exerciselist2)
2231
2241
  return None
2232
2242
 
2233
-
2243
+ #整理数据项
2234
2244
  df['Delta']=df['DELTA_VALUE']
2235
2245
  df['Gamma']=df['GAMMA_VALUE']
2236
2246
  df['Theta']=df['THETA_VALUE']
@@ -2272,7 +2282,7 @@ def fin_option_risk_sse2(option,maturity,exercise,trade_date, \
2272
2282
  #柱状图填充图案
2273
2283
  hatch_par = ['/', '', '|', '-', '+', 'x', 'o', 'O', '.', '*']
2274
2284
  c=dfg.plot(kind='bar', y=['看涨期权','看跌期权'],width=0.8,
2275
- color=['green','red'],fontsize=16)
2285
+ color=['green','red'],fontsize=16,alpha=0.5)
2276
2286
 
2277
2287
  #display the percentages above the bars as shown above 数据标签列表
2278
2288
  x=np.arange(len(dfg.index))
@@ -2299,6 +2309,9 @@ def fin_option_risk_sse2(option,maturity,exercise,trade_date, \
2299
2309
  c.spines['bottom'].set_visible(True) #保留横坐标边框
2300
2310
  c.spines['left'].set_visible(True)
2301
2311
 
2312
+ #绘制零线
2313
+ plt.axhline(y=0, color='k', linestyle='--')
2314
+
2302
2315
  plt.xticks(rotation=0)
2303
2316
 
2304
2317
  #option,maturity,exercise,trade_date
@@ -2311,12 +2324,12 @@ def fin_option_risk_sse2(option,maturity,exercise,trade_date, \
2311
2324
  plt.ylabel('希腊值') # y轴空轴
2312
2325
 
2313
2326
  #use font size 16 for the title, and, 标题字号
2314
- plt.title("上交所金融期权的希腊值:"+option+"期权",fontsize=18)
2327
+ plt.title("希腊值风险全景图:"+option+"期权",fontsize=18)
2315
2328
 
2316
2329
  #use font size 14 for the bar labels, percentages, and legend, 图例颜色
2317
2330
  plt.legend(fontsize=16,loc=loc)
2318
2331
 
2319
- plt.gca().set_facecolor('whitesmoke')
2332
+ plt.gca().set_facecolor(facecolor)
2320
2333
  plt.show
2321
2334
 
2322
2335
  return df9
@@ -2331,19 +2344,27 @@ if __name__=='__main__':
2331
2344
  #==============================================================================
2332
2345
  if __name__=='__main__':
2333
2346
  option='50ETF'
2334
- maturity='2209'
2335
- exercise=3000
2336
- date='2022-9-26'
2347
+ maturity='2412'
2348
+ exercise=2500
2349
+ trade_date='2024-9-10'
2350
+ measure='delta'
2351
+
2337
2352
  graph=True
2338
2353
  loc1='best'
2339
2354
  loc2='best'
2355
+
2356
+ twinx=False
2357
+ zeroline=False
2358
+ loc1='best';loc2='best'
2359
+ date_range=False;date_freq=False;date_fmt='%Y-%m'
2340
2360
 
2341
2361
  def fin_option_maturity_risk_sse(option,exercise,trade_date, \
2342
2362
  measure='delta', \
2343
2363
  graph=True, \
2344
2364
  twinx=False,zeroline=False, \
2345
2365
  loc1='best',loc2='best', \
2346
- date_range=False,date_freq=False,date_fmt='%Y-%m'):
2366
+ date_range=False,date_freq=False,date_fmt='%Y-%m',
2367
+ facecolor='whitesmoke'):
2347
2368
  """
2348
2369
  功能:绘制指定上交所金融期权的风险指标曲线,风险因素:到期日maturity(横轴),各个风险指标(纵轴,看涨/看跌)
2349
2370
  option: 期权名称
@@ -2353,7 +2374,7 @@ def fin_option_maturity_risk_sse(option,exercise,trade_date, \
2353
2374
  """
2354
2375
 
2355
2376
  #初步检查:期权名称
2356
- optionlist=["50ETF","300ETF","500ETF"]
2377
+ optionlist=["50ETF","300ETF","500ETF","科创50","科创板50"]
2357
2378
  if not (option in optionlist):
2358
2379
  print(" #Error(fin_option_maturity_risk_sse): option not found in SSE for",option)
2359
2380
  return None
@@ -2384,9 +2405,15 @@ def fin_option_maturity_risk_sse(option,exercise,trade_date, \
2384
2405
  df['underlying']=df['CONTRACT_ID'].apply(lambda x: x[:6])
2385
2406
  df['maturity']=df['CONTRACT_ID'].apply(lambda x: x[7:11])
2386
2407
 
2408
+ #获得期权名称
2409
+ #df['ETF end']=df['CONTRACT_SYMBOL'].apply(lambda x: x.find('ETF')+3)
2410
+ df['ETF end']=df['CONTRACT_SYMBOL'].apply(lambda x: x.find('购'))
2411
+ df['ETF end']=df.apply(lambda x: x['CONTRACT_SYMBOL'].find('沽') if x['ETF end'] < 0 else x['ETF end'],axis=1)
2412
+ df['option']=df.apply(lambda x: x['CONTRACT_SYMBOL'][:x['ETF end']],axis=1)
2413
+
2387
2414
  df['exercise']=df['CONTRACT_ID'].apply(lambda x: float(x[12:]))
2388
2415
  if not (exercise in list(df['exercise'])):
2389
- print(" #Error(fin_option_maturity_risk_sse): exericse point not found in SSE for",exercise)
2416
+ print(" #Warning(fin_option_maturity_risk_sse): exericse point not found in SSE for",exercise)
2390
2417
 
2391
2418
  df_exercise=df[(df['option']==option)]
2392
2419
  exerciselist=list(set(list(df_exercise['exercise'])))
@@ -2395,10 +2422,6 @@ def fin_option_maturity_risk_sse(option,exercise,trade_date, \
2395
2422
  print(" Available exercises:",exerciselist2)
2396
2423
  return None
2397
2424
 
2398
- #获得期权名称
2399
- df['ETF end']=df['CONTRACT_SYMBOL'].apply(lambda x: x.find('ETF')+3)
2400
- df['option']=df.apply(lambda x: x['CONTRACT_SYMBOL'][:x['ETF end']],axis=1)
2401
-
2402
2425
  #获得风险指标
2403
2426
  df['delta']=df['DELTA_VALUE']
2404
2427
  df['theta']=df['THETA_VALUE']
@@ -2413,7 +2436,7 @@ def fin_option_maturity_risk_sse(option,exercise,trade_date, \
2413
2436
 
2414
2437
  df9=df2[(df2['option']==option) & (df2['exercise']==exercise)]
2415
2438
  if len(df9) == 0:
2416
- print(" #Error(fin_option_maturity_risk_sse): options not available fulfilling",option,exercise)
2439
+ print(" #Warning(fin_option_maturity_risk_sse): options not available fulfilling",option,exercise)
2417
2440
  return None
2418
2441
 
2419
2442
  df9['Date']=df9['maturity'].apply(lambda x: '20'+x[:2]+'-'+x[2:4]+'-26')
@@ -2434,7 +2457,7 @@ def fin_option_maturity_risk_sse(option,exercise,trade_date, \
2434
2457
  #label2=measure
2435
2458
  #ylabeltxt="风险指标"
2436
2459
  ylabeltxt=ectranslate(measure)
2437
- titletxt='上交所金融期权风险:'+option+'期权,到期时间对'+ylabeltxt+"的影响"
2460
+ titletxt='希腊值风险趋势:'+option+'期权,到期时间对'+ylabeltxt+"的影响"
2438
2461
 
2439
2462
  footnote0="到期时间(不同期权)\n"
2440
2463
  footnote1=option+"期权"+",行权股指点位"+str(exercise)+",交易日"+trade_date
@@ -2442,8 +2465,22 @@ def fin_option_maturity_risk_sse(option,exercise,trade_date, \
2442
2465
  footnote2="数据来源: 新浪财经/东方财富, 制图"+str(today)
2443
2466
  footnote=footnote0+footnote1+"\n"+footnote2
2444
2467
 
2468
+ #设置zeroline
2469
+ maxC=df9C[colname1].max(); minC=df9C[colname1].min()
2470
+ maxP=df9P[colname2].max(); minP=df9P[colname2].min()
2471
+
2472
+ aboveZero=False; belowZero=False
2473
+ if maxC>0 or minC>0 or maxP>0 or minP>0: aboveZero=True
2474
+ if maxC<0 or minC<0 or maxP<0 or minP<0: belowZero=True
2475
+ if aboveZero and belowZero:
2476
+ zeroline=True
2477
+ else:
2478
+ zeroline=False
2479
+
2445
2480
  if twinx:
2446
2481
  zeroline=False
2482
+
2483
+ """
2447
2484
  plot2_line2(df9C,ticker1,colname1,'', \
2448
2485
  df9P,ticker2,colname2,'', \
2449
2486
  ylabeltxt,titletxt,footnote, \
@@ -2451,6 +2488,14 @@ def fin_option_maturity_risk_sse(option,exercise,trade_date, \
2451
2488
  zeroline=zeroline,yline=0, \
2452
2489
  loc1=loc1,loc2=loc2, \
2453
2490
  date_range=date_range,date_freq=date_freq,date_fmt=date_fmt)
2491
+ """
2492
+ plot_line2(df9C,ticker1,colname1,'', \
2493
+ df9P,ticker2,colname2,'', \
2494
+ ylabeltxt=ylabeltxt,titletxt=titletxt,footnote=footnote, \
2495
+ zeroline=zeroline,twinx=twinx, \
2496
+ loc1=loc1,loc2=loc2, \
2497
+ facecolor=facecolor
2498
+ )
2454
2499
 
2455
2500
  return df9
2456
2501
 
@@ -2472,7 +2517,8 @@ def fin_option_exercise_risk_sse(option,maturity,trade_date, \
2472
2517
  measure='delta', \
2473
2518
  graph=True, \
2474
2519
  zeroline=False, \
2475
- loc1='best',loc2='best'):
2520
+ loc1='best',loc2='best',
2521
+ facecolor='whitesmoke'):
2476
2522
  """
2477
2523
  功能:绘制指定上交所金融期权的风险指标曲线,风险因素:行权点位exercise(横轴),各个风险指标(纵轴,看涨/看跌)
2478
2524
  option: 期权名称
@@ -2482,7 +2528,7 @@ def fin_option_exercise_risk_sse(option,maturity,trade_date, \
2482
2528
  """
2483
2529
 
2484
2530
  #初步检查:期权名称
2485
- optionlist=["50ETF","300ETF","500ETF"]
2531
+ optionlist=["50ETF","300ETF","500ETF","科创50","科创板50"]
2486
2532
  if not (option in optionlist):
2487
2533
  print(" #Error(fin_option_exercise_risk_sse): option not found in SSE for",option)
2488
2534
  return None
@@ -2528,8 +2574,9 @@ def fin_option_exercise_risk_sse(option,maturity,trade_date, \
2528
2574
  df['exercise']=df['CONTRACT_ID'].apply(lambda x: float(x[12:]))
2529
2575
 
2530
2576
  #获得期权名称
2531
- df['ETF end']=df['CONTRACT_SYMBOL'].apply(lambda x: x.find('ETF')+3)
2532
- df['option']=df.apply(lambda x: x['CONTRACT_SYMBOL'][:x['ETF end']],axis=1)
2577
+ df['ETF end']=df['CONTRACT_SYMBOL'].apply(lambda x: x.find(''))
2578
+ df['ETF end']=df.apply(lambda x: x['CONTRACT_SYMBOL'].find('沽') if x['ETF end'] < 0 else x['ETF end'],axis=1)
2579
+ df['option']=df.apply(lambda x: x['CONTRACT_SYMBOL'][:x['ETF end']],axis=1)
2533
2580
 
2534
2581
  #获得风险指标
2535
2582
  df['delta']=df['DELTA_VALUE']
@@ -2565,7 +2612,19 @@ def fin_option_exercise_risk_sse(option,maturity,trade_date, \
2565
2612
  labeltxt="看跌期权"
2566
2613
  plt.plot(dftmp.exercise,dftmp[measure],'-',label=labeltxt, \
2567
2614
  linestyle='--',color='orange',linewidth=2)
2615
+
2616
+ #设置zeroline
2617
+ maxC=df9C[measure].max(); minC=df9C[measure].min()
2618
+ maxP=df9P[measure].max(); minP=df9P[measure].min()
2568
2619
 
2620
+ aboveZero=False; belowZero=False
2621
+ if maxC>0 or minC>0 or maxP>0 or minP>0: aboveZero=True
2622
+ if maxC<0 or minC<0 or maxP<0 or minP<0: belowZero=True
2623
+ if aboveZero and belowZero:
2624
+ zeroline=True
2625
+ else:
2626
+ zeroline=False
2627
+
2569
2628
  if zeroline:
2570
2629
  plt.axhline(y=0,label='',ls=":",c="black",linewidth=2.5)
2571
2630
 
@@ -2581,10 +2640,10 @@ def fin_option_exercise_risk_sse(option,maturity,trade_date, \
2581
2640
  footnote=footnote1+"\n"+footnote2+"\n"+footnote3
2582
2641
  plt.xlabel(footnote,fontsize=xlabel_txt_size)
2583
2642
 
2584
- titletxt='上交所金融期权风险:'+option+'期权,股指点位对'+ylabeltxt+'的影响'
2643
+ titletxt='希腊值风险趋势:'+option+'期权,股指点位对'+ylabeltxt+'的影响'
2585
2644
  plt.title(titletxt,fontweight='bold',fontsize=title_txt_size)
2586
2645
 
2587
- plt.gca().set_facecolor('whitesmoke')
2646
+ plt.gca().set_facecolor(facecolor)
2588
2647
  plt.show()
2589
2648
  plt.close()
2590
2649
 
@@ -2595,23 +2654,36 @@ if __name__=='__main__':
2595
2654
 
2596
2655
  #==============================================================================
2597
2656
  if __name__=='__main__':
2598
- option='50ETF'
2599
- maturity='2209'
2657
+ option='300ETF'
2658
+ maturity='2412'
2600
2659
  exercise=3500
2601
- start='2022-9-10'
2602
- end="2022-9-26"
2660
+ start='2024-8-10'
2661
+ end ="2024-9-10"
2662
+ measure='delta'
2663
+
2603
2664
  graph=True
2665
+ twinx=True;zeroline=True
2604
2666
  loc1='best'
2605
2667
  loc2='best'
2606
2668
  date_range=False
2607
2669
  date_freq=False
2670
+ facecolor='whitesmoke'
2671
+
2672
+ df=fin_option_time_risk_sse(option='300ETF',
2673
+ maturity='2412',
2674
+ exercise=3500,
2675
+ start='2024-8-10',end='2024-9-10',
2676
+ measure='delta',
2677
+ twinx=True,
2678
+ zeroline=True)
2608
2679
 
2609
2680
  def fin_option_time_risk_sse(option,maturity,exercise,start,end, \
2610
2681
  measure='delta', \
2611
2682
  graph=True, \
2612
2683
  twinx=False, zeroline=False, \
2613
2684
  loc1='best',loc2='best', \
2614
- date_range=False,date_freq=False):
2685
+ date_range=False,date_freq=False,
2686
+ facecolor='whitesmoke'):
2615
2687
  """
2616
2688
  功能:绘制指定上交所金融期权的风险指标曲线,风险因素:随时间推移start/end(横轴),各个风险指标(纵轴,看涨/看跌)
2617
2689
  option: 期权名称
@@ -2624,7 +2696,7 @@ def fin_option_time_risk_sse(option,maturity,exercise,start,end, \
2624
2696
  """
2625
2697
 
2626
2698
  #初步检查:期权名称
2627
- optionlist=["50ETF","300ETF","500ETF"]
2699
+ optionlist=["50ETF","300ETF","500ETF","科创50","科创板50"]
2628
2700
  if not (option in optionlist):
2629
2701
  print(" #Error(fin_option_time_risk_sse): option not found in SSE for",option)
2630
2702
  return None
@@ -2649,21 +2721,25 @@ def fin_option_time_risk_sse(option,maturity,exercise,start,end, \
2649
2721
  #循环获取各个交易日的指标
2650
2722
  df=pd.DataFrame()
2651
2723
  curdate=start; curdatepd=startpd
2652
- print("Searching information on ",end='')
2724
+
2725
+ num_days=calculate_days(start, end)
2726
+ num=0
2727
+ #print("Searching information on ",end='')
2653
2728
  while curdatepd <= endpd:
2654
- print(curdate,end=' ')
2729
+ #print(curdate,end=' ')
2655
2730
  akdate=convert_date_ts(curdate)
2656
2731
  try:
2657
2732
  dftmp = ak.option_risk_indicator_sse(date=akdate)
2658
- except:
2659
- curdate=date_adjust(curdate,adjust=1)
2660
- continue
2661
- try:
2662
- df=df.append(dftmp)
2663
- except:
2664
2733
  df=df._append(dftmp)
2734
+ except:
2735
+ pass
2736
+
2665
2737
  curdate=date_adjust(curdate,adjust=1)
2666
2738
  curdatepd=pd.to_datetime(curdate)
2739
+
2740
+ print_progress_percent(num,num_days-1,steps=5,leading_blanks=2)
2741
+ num=num+1
2742
+
2667
2743
  print(' ')
2668
2744
 
2669
2745
  #整理数据
@@ -2677,7 +2753,8 @@ def fin_option_time_risk_sse(option,maturity,exercise,start,end, \
2677
2753
  df['underlying']=df['CONTRACT_ID'].apply(lambda x: x[:6])
2678
2754
 
2679
2755
  #获得期权名称
2680
- df['ETF end']=df['CONTRACT_SYMBOL'].apply(lambda x: x.find('ETF')+3)
2756
+ df['ETF end']=df['CONTRACT_SYMBOL'].apply(lambda x: x.find(''))
2757
+ df['ETF end']=df.apply(lambda x: x['CONTRACT_SYMBOL'].find('沽') if x['ETF end'] < 0 else x['ETF end'],axis=1)
2681
2758
  df['option']=df.apply(lambda x: x['CONTRACT_SYMBOL'][:x['ETF end']],axis=1)
2682
2759
 
2683
2760
  df['maturity']=df['CONTRACT_ID'].apply(lambda x: x[7:11])
@@ -2731,7 +2808,7 @@ def fin_option_time_risk_sse(option,maturity,exercise,start,end, \
2731
2808
  #label2=measure
2732
2809
  #ylabeltxt="风险指标"
2733
2810
  ylabeltxt=ectranslate(measure)
2734
- titletxt='上交所金融期权风险:'+option+'期权,时间流逝对'+ylabeltxt+'的影响'
2811
+ titletxt='希腊值风险趋势:'+option+'期权,时间流逝对'+ylabeltxt+'的影响'
2735
2812
 
2736
2813
  footnote0="时间流逝(同一期权)\n"
2737
2814
  footnote1=option+"期权"+",行权股指点位"+str(exercise)+",到期时间"+maturity
@@ -2750,8 +2827,21 @@ def fin_option_time_risk_sse(option,maturity,exercise,start,end, \
2750
2827
  elif ndays <=80:
2751
2828
  date_range=True; date_freq='4D'
2752
2829
 
2830
+ #设置zeroline
2831
+ maxC=df9C[colname1].max(); minC=df9C[colname1].min()
2832
+ maxP=df9P[colname2].max(); minP=df9P[colname2].min()
2833
+
2834
+ aboveZero=False; belowZero=False
2835
+ if maxC>0 or minC>0 or maxP>0 or minP>0: aboveZero=True
2836
+ if maxC<0 or minC<0 or maxP<0 or minP<0: belowZero=True
2837
+ if aboveZero and belowZero:
2838
+ zeroline=True
2839
+ else:
2840
+ zeroline=False
2841
+
2753
2842
  if twinx:
2754
2843
  zeroline=False
2844
+ """
2755
2845
  plot2_line2(df9C,ticker1,colname1,'', \
2756
2846
  df9P,ticker2,colname2,'', \
2757
2847
  ylabeltxt,titletxt,footnote, \
@@ -2759,13 +2849,21 @@ def fin_option_time_risk_sse(option,maturity,exercise,start,end, \
2759
2849
  zeroline=zeroline,yline=0, \
2760
2850
  loc1=loc1,loc2=loc2, \
2761
2851
  date_range=date_range,date_freq=date_freq)
2852
+ """
2853
+ plot_line2(df9C,ticker1,colname1,'', \
2854
+ df9P,ticker2,colname2,'', \
2855
+ ylabeltxt=ylabeltxt,titletxt=titletxt,footnote=footnote, \
2856
+ zeroline=zeroline,twinx=twinx, \
2857
+ loc1=loc1,loc2=loc2, \
2858
+ facecolor=facecolor
2859
+ )
2762
2860
 
2763
2861
  return df9
2764
2862
 
2765
2863
  if __name__=='__main__':
2766
2864
  df=fin_option_time_risk_sse(option='300ETF',maturity='2209',exercise=4500,start='2022-8-26',end='2022-9-26',measure='implied volatility')
2767
2865
  #==============================================================================
2768
- #=============================================================================
2866
+ #==============================================================================
2769
2867
  #==============================================================================
2770
2868
  if __name__=='__main__':
2771
2869
  end_month="2303"
@@ -2801,5 +2899,108 @@ def option_expire_date(end_month,numOfWeek,numOfWeekday):
2801
2899
  print(" #Error(option_expire_date): invalid date --> weekday",numOfWeekday,'of week',numOfWeek,'in',end_month)
2802
2900
  return None
2803
2901
 
2804
- #=============================================================================
2805
- #=============================================================================
2902
+ #==============================================================================
2903
+ #==============================================================================
2904
+ #==============================================================================
2905
+ if __name__=='__main__':
2906
+ options='50ETF'
2907
+ maturity='2412'
2908
+ exercise=3000
2909
+ trade_date='recent'
2910
+ period_days=30
2911
+ risk='none'
2912
+ twinx=False
2913
+ zeroline=False
2914
+ printout=True; graph=True
2915
+ facecolor='whitesmoke'
2916
+
2917
+ def options_greek_china(options, \
2918
+ exercise=0, \
2919
+ maturity='recent', \
2920
+ trade_date='recent', \
2921
+ period_days=30, \
2922
+ risk='none', \
2923
+ greek='delta', \
2924
+ twinx=False, \
2925
+ zeroline=False, \
2926
+ printout=False, graph=True, \
2927
+ facecolor='whitesmoke', \
2928
+ loc1='best',loc2='best'):
2929
+ """
2930
+ 功能:套壳函数
2931
+ 套壳:fin_option_risk_sse, fin_option_risk_sse2, fin_option_maturity_risk_sse,
2932
+ fin_option_exercise_risk_sse, fin_option_time_risk_sse
2933
+
2934
+ 套壳条件:
2935
+ 当printout==True且risk=='none'时,执行fin_option_risk_sse
2936
+ 当printout==False且graph==True且risk=='none'时,执行fin_option_risk_sse2
2937
+ 当risk=='maturity'时,执行fin_option_maturity_risk_sse
2938
+ 当risk=='exercise'时,执行fin_option_exercise_risk_sse
2939
+ 当risk=='time'时,执行fin_option_time_risk_sse
2940
+ """
2941
+ #处理默认日期为上一个非周末的交易日,也可手动指定交易日
2942
+ if trade_date=='recent':
2943
+ import datetime as dt; stoday=dt.date.today()
2944
+ wd=stoday.weekday() #周一为0
2945
+ if wd==6:#周日
2946
+ trade_date=date_adjust(str(stoday), adjust=-2)
2947
+ elif wd==0:#周一
2948
+ trade_date=date_adjust(str(stoday), adjust=-3)
2949
+ else:
2950
+ trade_date=date_adjust(str(stoday), adjust=-1)
2951
+
2952
+ if risk=='none':
2953
+ if printout:
2954
+ df=fin_option_risk_sse(option=options,
2955
+ maturity=maturity,
2956
+ exercise=exercise,
2957
+ trade_date=trade_date)
2958
+ return df
2959
+
2960
+ if not printout and graph:
2961
+ df=fin_option_risk_sse2(option=options,
2962
+ maturity=maturity,
2963
+ exercise=exercise,
2964
+ trade_date=trade_date)
2965
+ return df
2966
+
2967
+ if risk=='maturity':
2968
+ df=fin_option_maturity_risk_sse(option=options,
2969
+ exercise=exercise,
2970
+ trade_date=trade_date,
2971
+ measure=greek,
2972
+ twinx=twinx,
2973
+ zeroline=zeroline,
2974
+ loc1=loc1,loc2=loc2)
2975
+ return df
2976
+
2977
+ if risk=='exercise':
2978
+ df=fin_option_exercise_risk_sse(option=options,
2979
+ maturity=maturity,
2980
+ trade_date=trade_date,
2981
+ measure=greek,
2982
+ zeroline=zeroline,
2983
+ loc1=loc1,loc2=loc2)
2984
+ return df
2985
+
2986
+ if risk=='time':
2987
+ start=date_adjust(trade_date, adjust=-period_days)
2988
+ df=fin_option_time_risk_sse(option=options,
2989
+ maturity=maturity,
2990
+ exercise=exercise,
2991
+ start=start,end=trade_date,
2992
+ measure=greek,
2993
+ twinx=twinx,
2994
+ zeroline=zeroline,
2995
+ loc1=loc1,loc2=loc2)
2996
+ return df
2997
+
2998
+ print("Sorry, no idea on what I can do for you:-(")
2999
+ return None
3000
+
3001
+
3002
+ #==============================================================================
3003
+ #==============================================================================
3004
+ #==============================================================================
3005
+ #==============================================================================
3006
+ #==============================================================================
siat/option_pricing.py CHANGED
@@ -19,6 +19,7 @@ from siat.common import *
19
19
  from siat.translate import *
20
20
  from siat.grafix import *
21
21
  from siat.security_prices import *
22
+ from siat.security_trend2 import *
22
23
  #==============================================================================
23
24
  import matplotlib.pyplot as plt
24
25
 
@@ -1177,9 +1178,11 @@ def option_maturity(ticker,printout=True):
1177
1178
  if not printout:
1178
1179
  return datelist
1179
1180
 
1181
+ tname=get_stock_name1_en(ticker)
1182
+
1180
1183
  #显示结果
1181
1184
  print("\n===== 期权的时间序列 =====")
1182
- print("标的资产:",ticker)
1185
+ print("标的资产:",tname)
1183
1186
  print("到期日期:")
1184
1187
 
1185
1188
  num=len(datelist)
@@ -1191,7 +1194,7 @@ def option_maturity(ticker,printout=True):
1191
1194
  print("总计:",num,"个日期")
1192
1195
  import datetime
1193
1196
  today = datetime.date.today()
1194
- print("*** 数据来源: 雅虎财经,",today)
1197
+ print("\n*** 数据来源: 雅虎财经,",today)
1195
1198
 
1196
1199
  return datelist
1197
1200
 
@@ -1204,12 +1207,18 @@ if __name__=='__main__':
1204
1207
  #================================================================
1205
1208
  if __name__=='__main__':
1206
1209
  ticker="AAPL"
1207
- mdate="2020-11-06"
1210
+ maturity_date="2025-2-21"
1208
1211
 
1209
- def option_chain(ticker,mdate,printout=True):
1212
+ def option_chain(ticker,maturity_date='today',printout=True):
1210
1213
  """
1211
1214
  功能:获得期权的各个到期日期,并列出某个到期日的期权合约
1212
1215
  """
1216
+ mdate=maturity_date
1217
+
1218
+ if mdate=='today':
1219
+ import datetime as dt; stoday=dt.date.today()
1220
+ mdate=str(stoday)
1221
+
1213
1222
  import yfinance as yf
1214
1223
  opt = yf.Ticker(ticker)
1215
1224
 
@@ -1257,12 +1266,11 @@ def option_chain(ticker,mdate,printout=True):
1257
1266
 
1258
1267
  if not printout:
1259
1268
  return opt_call2, opt_put2
1260
-
1261
- import datetime
1262
- today = datetime.date.today()
1269
+
1270
+ tname=get_stock_name1_en(ticker)
1263
1271
 
1264
1272
  print("\n===== 期权链的结构 =====")
1265
- print("标的资产:",ticker_name(ticker))
1273
+ print("标的资产:",tname)
1266
1274
  print("到期日期:",mdate)
1267
1275
  print("看涨期权:",num_call)
1268
1276
  print(" 实值/虚值:",num_call_ITM,'/',num_call_OTM)
@@ -1271,29 +1279,44 @@ def option_chain(ticker,mdate,printout=True):
1271
1279
  print("最低/最高行权价:",strike_min,'/',strike_max,currency)
1272
1280
 
1273
1281
  import datetime
1274
- today = datetime.date.today()
1275
- print("*数据来源: 雅虎财经,",today)
1282
+ stoday = datetime.date.today()
1283
+ print("\n*数据来源: 雅虎财经,",stoday)
1276
1284
 
1277
- #绘图
1285
+ #设置绘图数据
1278
1286
  df1=opt_call2.copy()
1279
1287
  df1.sort_values(by=['strike'],axis=0,ascending=[True],inplace=True)
1280
1288
  df1.set_index(['strike'],inplace=True)
1289
+ df1['exercise']=df1.index
1281
1290
  colname1='lastPrice'; label1='看涨期权价格'
1282
1291
 
1283
1292
  df2=opt_put2.copy()
1284
1293
  df2.sort_values(by=['strike'],axis=0,ascending=[True],inplace=True)
1285
1294
  df2.set_index(['strike'],inplace=True)
1295
+ df2['exercise']=df2.index
1286
1296
  colname2='lastPrice'; label2='看跌期权价格'
1287
1297
 
1288
1298
  ylabeltxt='期权价格('+currency+')'
1289
- titletxt="期权价格与其标的资产行权价格的关系"
1290
- footnote="行权价("+currency+") -->\n"+ \
1291
- "标的资产: "+ticker_name(ticker)+ \
1299
+ titletxt="期权价格与标的行权价格的关系"
1300
+ footnote="标的行权价("+currency+") -->\n"+ \
1301
+ "标的资产: "+tname+ \
1292
1302
  ", "+"到期日: "+mdate+ \
1293
- "\n数据来源: 雅虎财经, "+str(today)
1294
- plot_2lines(df1,colname1,label1,df2,colname2,label2, \
1295
- ylabeltxt,titletxt,footnote)
1296
-
1303
+ "\n数据来源: 雅虎财经, "+str(stoday)
1304
+
1305
+ #绘图
1306
+ import matplotlib.pyplot as plt
1307
+ plt.plot(df1.index,df1[colname1],color='red',linestyle='-',linewidth=1.5, \
1308
+ label=label1)
1309
+
1310
+ plt.plot(df2.index,df2[colname2],color='blue',linestyle='-',linewidth=1.5, \
1311
+ label=label2)
1312
+
1313
+ plt.ylabel(ylabeltxt,fontsize=ylabel_txt_size)
1314
+ plt.xlabel(footnote,fontsize=xlabel_txt_size)
1315
+ plt.title(titletxt,fontsize=title_txt_size)
1316
+ plt.legend(fontsize=legend_txt_size)
1317
+ plt.show()
1318
+
1319
+
1297
1320
  return opt_call2, opt_put2
1298
1321
 
1299
1322
  if __name__=='__main__':
@@ -1309,24 +1332,27 @@ if __name__ =="__main__":
1309
1332
  #def predict_stock_trend_by_option(ticker,lastndays=7,power=4):
1310
1333
  def predict_stock_trend_by_option(ticker,lastndays=7):
1311
1334
  """
1312
- 功能:根据股票期权行权价及交易量预测股价,本函数已废弃!
1335
+ 功能:根据股票期权行权价及交易量预测股价
1336
+ 注意:本函数已废弃!
1313
1337
  """
1314
-
1338
+ DEBUG=False
1315
1339
  try:
1316
1340
  datelist=option_maturity(ticker,printout=False)
1317
1341
  except:
1318
- print("#Error(predict_stock_price_by_option): option info not found for stock",ticker)
1342
+ print(" #Error(predict_stock_price_by_option): option info not found for",ticker)
1319
1343
  if datelist is None:
1320
- print("Warning(predict_stock_price_by_option): options not found for stock",ticker)
1344
+ print(" #Warning(predict_stock_price_by_option): options not found for",ticker)
1321
1345
  return None
1322
- print("\nFound stock options with",len(datelist),"maturity dates")
1346
+ print("\nFound options with",len(datelist),"maturity dates for",ticker)
1323
1347
 
1324
1348
  import pandas as pd
1325
1349
  df=pd.DataFrame(columns=['Ticker','Date','WA Strike','Total Options', \
1326
1350
  'Calls in Total%','OTM in Calls%','OTM Calls in Total%', \
1327
1351
  'Puts in Total%','OTM in Puts%','OTM Puts in Total%'])
1328
1352
  for d in datelist:
1329
- print("Processing options matured on",d)
1353
+ print_progress_percent2(d,datelist,steps=5,leading_blanks=4)
1354
+
1355
+ if DEBUG: print("Processing options matured on",d)
1330
1356
  opt_call,opt_put=option_chain(ticker,d,printout=False)
1331
1357
 
1332
1358
  numofcalls=len(opt_call)
@@ -1386,7 +1412,7 @@ def predict_stock_trend_by_option(ticker,lastndays=7):
1386
1412
  colname2='Puts in Total%'
1387
1413
  label2='Puts in Total%'
1388
1414
  ylabeltxt='Percentage'
1389
- titletxt="Stock Option Comparison: "+ticker+", Calls vs Puts"
1415
+ titletxt="Option Comparison: "+ticker+", Calls vs Puts"
1390
1416
 
1391
1417
  footnote="Source: Yahoo Finance, "+str(today)
1392
1418
  plot_line2(df2,ticker,colname1,label1, \
@@ -1399,7 +1425,7 @@ def predict_stock_trend_by_option(ticker,lastndays=7):
1399
1425
  colname2='OTM in Puts%'
1400
1426
  label2='OTM in Puts%'
1401
1427
  ylabeltxt='Percentage'
1402
- titletxt="Stock Option Relative Proportion Comparison\n("+ticker+", OTM Calls vs OTM Puts)"
1428
+ titletxt="Option Relative Proportion Comparison\n("+ticker+", OTM Calls vs OTM Puts)"
1403
1429
 
1404
1430
  footnote="Source: Yahoo Finance, "+str(today)
1405
1431
  plot_line2(df2,ticker,colname1,label1, \
@@ -1412,7 +1438,7 @@ def predict_stock_trend_by_option(ticker,lastndays=7):
1412
1438
  colname2='OTM Puts in Total%'
1413
1439
  label2='OTM Puts in Total%'
1414
1440
  ylabeltxt='Percentage'
1415
- titletxt="Stock Option Absolute Proportion Comparison\n("+ticker+", OTM Calls vs OTM Puts)"
1441
+ titletxt="Option Absolute Proportion Comparison\n("+ticker+", OTM Calls vs OTM Puts)"
1416
1442
 
1417
1443
  footnote="Source: Yahoo Finance, "+str(today)
1418
1444
  plot_line2(df2,ticker,colname1,label1, \
@@ -1423,9 +1449,9 @@ def predict_stock_trend_by_option(ticker,lastndays=7):
1423
1449
  df2x=df2.drop(df2[df2['Total Options']<=1].index)
1424
1450
  """
1425
1451
  colname='WA Strike'
1426
- collabel='Predicted Stock Price'
1452
+ collabel='Predicted Price'
1427
1453
  ylabeltxt=''
1428
- titletxt="Predicting Stock Prices via Stock Options: "+ticker
1454
+ titletxt="Predicting Prices via Options: "+ticker
1429
1455
  footnote="Source: Yahoo Finance, "+str(today)
1430
1456
  plot_line(df2x,colname,collabel,ylabeltxt,titletxt,footnote,power=power)
1431
1457
  """
@@ -1445,7 +1471,8 @@ def predict_stock_trend_by_option(ticker,lastndays=7):
1445
1471
  df3.rename(columns={'OTM in Calls%':'OTMinCalls%','OTM in Puts%':'OTMinPuts%'}, inplace = True)
1446
1472
  df3.rename(columns={'OTM Calls in Total%':'OTM Calls/Total%','OTM Puts in Total%':'OTM Puts/Total%'}, inplace = True)
1447
1473
 
1448
- print("\n ======= Predicting Stock Price Trend via Stock Option Configuration: "+ticker+" =======")
1474
+ """
1475
+ print("\n ======= Predicting Price Trend via Option Configuration: "+ticker+" =======")
1449
1476
  #设置打印对齐
1450
1477
  pd.set_option('display.max_columns', 1000)
1451
1478
  pd.set_option('display.width', 1000)
@@ -1453,14 +1480,32 @@ def predict_stock_trend_by_option(ticker,lastndays=7):
1453
1480
  pd.set_option('display.unicode.ambiguous_as_wide', True)
1454
1481
  pd.set_option('display.unicode.east_asian_width', True)
1455
1482
  print(df3.to_string(index=False))
1456
-
1457
- lastdate,lastprice=get_last_close(ticker)
1483
+ """
1484
+ #lastdate,lastprice=get_last_close1(ticker)
1485
+ prices_tmp=security_trend(ticker,graph=False)
1486
+ lastdate=str(prices_tmp.tail(1).index.values[0].date())
1487
+ lastprice=str(prices_tmp.tail(1).Close.values[0])
1488
+ """
1458
1489
  print(" Note:")
1459
1490
  print(" 1) Recent price:",lastprice,"\b,",lastdate,'\b.')
1460
1491
  print(" 2) +(-) predicts higher(lower) price than recent, ++(--) for more likely, +/- for undetermined trend.")
1461
1492
  print(" 3) Option trade period: recent "+str(lastndays)+" days. No stock splits in the period. Dates with only 1 option removed.")
1462
1493
  #print(" 4) Removed those samples with only one option, if any.")
1463
1494
  print(" "+footnote+'.')
1495
+ """
1496
+ tname=get_stock_name1_en(ticker,short_name=True)
1497
+ titletxt="Predicting Price Trend via Option Configuration: "+tname
1498
+ footnote1="Note:\n"
1499
+ footnote2="1. Recent price: "+lastprice+", "+lastdate+'\n'
1500
+ footnote3="2. +(-) predicts higher(lower) price than recent, ++(--) for more likely, +/- for undetermined trend\n"
1501
+ footnote4="3. Option trade period: recent "+str(lastndays)+" days. No stock splits in the period. Dates with only 1 option removed\n"
1502
+ footnote9=footnote1+footnote2+footnote3+footnote4+footnote
1503
+
1504
+ df_display_CSS(df3,titletxt=titletxt,footnote=footnote9,facecolor='papayawhip',decimals=2, \
1505
+ first_col_align='left',second_col_align='right', \
1506
+ last_col_align='right',other_col_align='right', \
1507
+ titile_font_size='16px',heading_font_size='15px', \
1508
+ data_font_size='15px')
1464
1509
 
1465
1510
  return df2
1466
1511
 
@@ -1561,10 +1606,10 @@ def put_timevalue(row):
1561
1606
  #==============================================================================
1562
1607
 
1563
1608
  if __name__ =="__main__":
1564
- ticker='JD'
1609
+ ticker='AAPL'
1565
1610
  lastndays=2
1566
1611
 
1567
- def stock_trend_by_option(ticker,lastndays=7,cutoff=[1.1,5.0,10.0]):
1612
+ def price_prospect_via_option(ticker,lastdays=7,cutoff=[1.1,5.0,10.0]):
1568
1613
  """
1569
1614
  功能:根据股票期权预测股价
1570
1615
  算法:
@@ -1575,39 +1620,47 @@ def stock_trend_by_option(ticker,lastndays=7,cutoff=[1.1,5.0,10.0]):
1575
1620
  5、否则,为不明确
1576
1621
  返回:股票期权明细
1577
1622
  """
1578
- DEBUG=True
1579
- print("\nSearching for the option chain of stock",ticker,'...',end='')
1623
+ lastndays=lastdays
1624
+
1625
+ DEBUG=False
1626
+ print("Searching option chain for",ticker,'...',end='')
1580
1627
 
1581
1628
  try:
1582
1629
  datelist=option_maturity(ticker,printout=False)
1583
1630
  except:
1584
- print("\n #Error(stock_trend_by_option): option info not found for stock",ticker)
1631
+ print("\n #Warning(price_prospect_via_option): option info not found for",ticker)
1585
1632
  return None
1586
1633
  if datelist is None:
1587
- print("\n Warning(stock_trend_by_option): options not found for stock",ticker)
1634
+ print("\n #Warning(price_prospect_via_option): options not found for",ticker)
1588
1635
  return None
1589
- print("found",len(datelist),"maturity dates")
1636
+ print("found",len(datelist),"maturity dates of options")
1590
1637
 
1591
1638
  #最新的股价
1592
- print("Searching for the recent close price of stock",ticker,'...',end='')
1639
+ #print("Searching recent close price for",ticker,'...',end='')
1593
1640
  try:
1594
- lastsdate,lastsprice=get_last_close(ticker)
1641
+ #lastsdate,lastsprice=get_last_close1(ticker)
1642
+ prices_tmp=security_trend(ticker,graph=False)
1643
+ lastsdate=str(prices_tmp.tail(1).index.values[0].date())
1644
+ lastsprice=str(prices_tmp.tail(1).Close.values[0])
1645
+
1595
1646
  except:
1596
- print("\n#Error(stock_trend_by_option): failed in retrieving close price for stock",ticker)
1647
+ print("\n #Error(price_prospect_via_option): failed in retrieving close price for",ticker)
1597
1648
  return None
1598
1649
  if (lastsdate is None) or (lastsprice is None):
1599
- print("\n#Error(stock_trend_by_option): retrieving close price failed for stock",ticker)
1650
+ print("\n #Error(price_prospect_via_option): retrieving close price failed for",ticker)
1600
1651
  return None
1601
- print(lastsprice,'\b,',lastsdate)
1652
+ if DEBUG: print(lastsprice,'\b,',lastsdate)
1602
1653
 
1603
1654
  import pandas as pd
1604
1655
  df=pd.DataFrame(columns=['Ticker','Date','Trend','Estimated Price', \
1605
1656
  'OTM Volume Call/Put','OTM Amount Call/Put','Spot Date','Spot Price'])
1606
1657
  for d in datelist:
1607
- print("Analyzing options matured on",d,'...')
1658
+ print_progress_percent2(d,datelist,steps=5,leading_blanks=4)
1659
+
1660
+ if DEBUG: print("Analyzing options matured on",d,'...')
1608
1661
  opt_call,opt_put=option_chain(ticker,d,printout=False)
1609
1662
  if (len(opt_call) == 0) or (len(opt_put) == 0):
1610
- print(" #Error(stock_trend_by_option): failed in retrieving stock option matured on",d)
1663
+ print(" #Error(price_prospect_via_option): failed in retrieving options matured on",d)
1611
1664
  break
1612
1665
  return None
1613
1666
  currency=list(opt_call['currency'])[0]
@@ -1697,7 +1750,7 @@ def stock_trend_by_option(ticker,lastndays=7,cutoff=[1.1,5.0,10.0]):
1697
1750
  if DEBUG: print(", done!")
1698
1751
 
1699
1752
  #比较虚值看涨/看跌期权的数量和交易金额
1700
- if DEBUG: print(" Evaluating stock price trend ...",end='')
1753
+ if DEBUG: print(" Evaluating price trend ...",end='')
1701
1754
  rateqty=round(numofotmcalls/numofotmputs,2)
1702
1755
  rateamt=round(amtofotmcalls/amtofotmputs,2)
1703
1756
  trend='+/-'
@@ -1737,10 +1790,11 @@ def stock_trend_by_option(ticker,lastndays=7,cutoff=[1.1,5.0,10.0]):
1737
1790
  df['date']=df['Date'].apply(todatetime)
1738
1791
  df2=df.set_index(['date'])
1739
1792
 
1793
+ tname=get_stock_name1_en(ticker,short_name=True)
1740
1794
 
1741
1795
  #绘图1:虚值Calls vs Puts数量比例
1742
1796
  import datetime
1743
- today = datetime.date.today()
1797
+ stoday = datetime.date.today()
1744
1798
 
1745
1799
  df2['Benchmark']=1.0
1746
1800
  colname1='OTM Volume Call/Put'
@@ -1748,9 +1802,9 @@ def stock_trend_by_option(ticker,lastndays=7,cutoff=[1.1,5.0,10.0]):
1748
1802
  colname2='Benchmark'
1749
1803
  label2='等比例线'
1750
1804
  ylabeltxt='比例'
1751
- titletxt="期权链结构中的合约数量: "+ticker_name(ticker)+", 虚值看涨/看跌期权比例"
1805
+ titletxt="期权链中的合约数量: "+tname+", 虚值看涨/看跌期权比例"
1752
1806
 
1753
- footnote="数据来源:雅虎财经, "+str(today)
1807
+ footnote="数据来源:雅虎财经, "+str(stoday)
1754
1808
  plot_line2(df2,ticker,colname1,label1, \
1755
1809
  df2,ticker,colname2,label2, \
1756
1810
  ylabeltxt,titletxt,footnote)
@@ -1758,9 +1812,8 @@ def stock_trend_by_option(ticker,lastndays=7,cutoff=[1.1,5.0,10.0]):
1758
1812
  #绘图2:OTM Calls vs OTM Puts交易金额比例
1759
1813
  colname1='OTM Amount Call/Put'
1760
1814
  label1='虚值看涨/看跌期权交易金额比例'
1761
- titletxt="期权链结构中的交易金额: "+ticker_name(ticker)+", 虚值看涨/看跌期权比例"
1815
+ titletxt="期权链中的交易金额: "+tname+", 虚值看涨/看跌期权比例"
1762
1816
 
1763
- footnote="数据来源:雅虎财经, "+str(today)
1764
1817
  plot_line2(df2,ticker,colname1,label1, \
1765
1818
  df2,ticker,colname2,label2, \
1766
1819
  ylabeltxt,titletxt,footnote)
@@ -1772,9 +1825,8 @@ def stock_trend_by_option(ticker,lastndays=7,cutoff=[1.1,5.0,10.0]):
1772
1825
  colname2='Benchmark'
1773
1826
  label2='当前股价'
1774
1827
  ylabeltxt='股价('+currency+')'
1775
- titletxt="基于期权链结构的股价走势估计: "+ticker_name(ticker)
1828
+ titletxt="期权链与标的价格预期: "+tname
1776
1829
 
1777
- footnote="数据来源:雅虎财经, "+str(today)
1778
1830
  plot_line2(df2,ticker,colname1,label1, \
1779
1831
  df2,ticker,colname2,label2, \
1780
1832
  ylabeltxt,titletxt,footnote)
@@ -1782,8 +1834,8 @@ def stock_trend_by_option(ticker,lastndays=7,cutoff=[1.1,5.0,10.0]):
1782
1834
  #打印预测结果
1783
1835
  collist=['Date','Trend','Estimated Price','OTM Volume Call/Put','OTM Amount Call/Put']
1784
1836
  df3=df2[collist]
1785
-
1786
- print("\n ======= 基于期权链结构的股票走势和价格预期: "+ticker_name(ticker)+" =======")
1837
+ """
1838
+ print("\n ======= 基于期权链结构的股票走势和价格预期: "+tname+" =======")
1787
1839
  #设置打印对齐
1788
1840
  pd.set_option('display.max_columns', 1000)
1789
1841
  pd.set_option('display.width', 1000)
@@ -1799,6 +1851,21 @@ def stock_trend_by_option(ticker,lastndays=7,cutoff=[1.1,5.0,10.0]):
1799
1851
  print(" 3) 期权交易样本期间: 最近"+str(lastndays)+"个日历日,且期间内未发生分拆.")
1800
1852
  print(" 4) 股价估计可能随时变化,越远期的估计可能准确度越欠佳.")
1801
1853
  print(" "+footnote+'.')
1854
+ """
1855
+ titletxt="期权链与标的价格预期: "+tname
1856
+ footnote1="注:\n"
1857
+ footnote2="1、当前股价: "+currency+str(lastsprice)+", "+lastsdate+'\n'
1858
+ footnote3="2、+(-)表示股价将比当前变高(低), +/-表示趋势不明朗\n"
1859
+ footnote4="3、期权交易样本期间: 最近"+str(lastndays)+"个日历日,且期间内未发生分拆\n"
1860
+ footnote5="4) 股价估计可能随时变化,越远期的估计可能准确度越欠佳\n"
1861
+
1862
+ footnote9=footnote1+footnote2+footnote3+footnote4+footnote5+footnote
1863
+
1864
+ df_display_CSS(df3,titletxt=titletxt,footnote=footnote9,facecolor='papayawhip',decimals=2, \
1865
+ first_col_align='left',second_col_align='right', \
1866
+ last_col_align='right',other_col_align='right', \
1867
+ titile_font_size='16px',heading_font_size='15px', \
1868
+ data_font_size='15px')
1802
1869
 
1803
1870
  return df2
1804
1871
 
siat/security_prices.py CHANGED
@@ -2386,6 +2386,7 @@ if __name__ =="__main__":
2386
2386
  #==============================================================================
2387
2387
  if __name__ =="__main__":
2388
2388
  ticker='AAPL'
2389
+ get_last_close(ticker)
2389
2390
 
2390
2391
  def get_last_close(ticker):
2391
2392
  """
@@ -2397,22 +2398,24 @@ def get_last_close(ticker):
2397
2398
  """
2398
2399
  #获取今日日期
2399
2400
  import datetime
2400
- today = datetime.date.today()
2401
- fromdate = date_adjust(today,-30)
2401
+ stoday = datetime.date.today()
2402
+ fromdate = date_adjust(stoday,-30)
2403
+ todate=str(stoday)
2402
2404
 
2403
2405
  #抓取新浪/stooq股票价格
2404
- from pandas_datareader import data
2405
2406
  try:
2406
- price=data.DataReader(ticker,start=fromdate,end=today,data_source='yahoo')
2407
+ #price,found=get_price_1ticker_mixed(ticker,fromdate=fromdate,todate=todate,source='yahoo')
2408
+ price,found=get_price_1ticker_mixed(ticker,fromdate=fromdate,todate=todate)
2407
2409
  except:
2408
- print("\n #Error(get_last_close): failed in retrieving prices!")
2410
+ print("\n #Error(get_last_close): failed in retrieving prices for",ticker)
2409
2411
  return None,None
2410
2412
  if price is None:
2411
- print("\n #Error(get_last_close): retrieved none info!")
2413
+ print("\n #Error(get_last_close): retrieved none info for",ticker)
2412
2414
  return None,None
2413
2415
  if len(price)==0:
2414
- print("\n #Error(get_last_close): retrieved empty info!")
2416
+ print("\n #Error(get_last_close): retrieved empty info for",ticker)
2415
2417
  return None,None
2418
+
2416
2419
  price['date']=price.index
2417
2420
  datecvt=lambda x:x.strftime("%Y-%m-%d")
2418
2421
  price['date']=price['date'].apply(datecvt)
siat/translate.py CHANGED
@@ -1263,6 +1263,7 @@ def codetranslate0(code):
1263
1263
 
1264
1264
  #期货==================================================================
1265
1265
  ["HG=F",'COMEX铜矿石期货'],["CL=F",'NYM原油期货'],
1266
+ ["6B=F",'CME英镑兑美元期货'],
1266
1267
  ["S=F",'CBT大豆期货'],["C=F",'CBT玉米期货'],
1267
1268
  ["ES=F",'CME标普500指数期货'],["YM=F",'CBT道指期货'],
1268
1269
  ["NQ=F",'CME纳指100期货'],["RTY=F",'罗素2000指数期货'],
@@ -2085,6 +2086,7 @@ def codetranslate1(code):
2085
2086
 
2086
2087
  #期货==================================================================
2087
2088
  ["HG=F",'COMEX铜矿石期货'],["CL=F",'NYM原油期货'],
2089
+ ["6B=F",'CME英镑兑美元期货'],
2088
2090
  ["S=F",'CBT大豆期货'],["C=F",'CBT玉米期货'],
2089
2091
  ["ES=F",'CME标普500指数期货'],["YM=F",'CBT道指期货'],
2090
2092
  ["NQ=F",'CME纳指100期货'],["RTY=F",'罗素2000指数期货'],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: siat
3
- Version: 3.4.6
3
+ Version: 3.4.8
4
4
  Summary: Securities Investment Analysis Tools (siat)
5
5
  Home-page: https://pypi.org/project/siat/
6
6
  Author: Prof. WANG Dehong, International Business School, Beijing Foreign Studies University
@@ -35,34 +35,37 @@ Requires-Dist: itables
35
35
  Requires-Dist: py-trans
36
36
  Requires-Dist: bottleneck
37
37
 
38
- # Welcome to the Magic World of siat
38
+ <center><font size=6>Welcome to SIAT
39
39
 
40
- # Version history
41
- Current version: 3.2
42
-
43
- This version unifies the architecture of stock, bond and investment fund together.
40
+ # What is siat?
41
+ siat is a Python plug-in for security investment analysis, specially designed for teaching and learning purposes in universities for undergraduate and postgraduate programs.
44
42
 
45
- The unifcation not only makes it convenient to analyze stock, bond and investment fund in same scripts, but also make it easier to construct an investment portfolio with stock, bond and investment fund as components.
43
+ Most of the results by siat are in the form of figures and/or tables.
44
+ # Version history
46
45
  Version structure: X.Y.Z
47
46
 
48
47
  X is the major version for architecture upgrade only.
49
48
  Y is the functional version for functional enhancement.
50
49
  Z is the minor version just for bug fixing.
51
- # What is siat?
52
- siat is a Python plug-in, which stands for security investment analysis toolkit.
53
-
54
- It is specially designed for teaching and learning purposes on security investment in universities for undergraduate and postgraduate programs.
55
50
  # Quick examples of using siat
56
51
 
57
52
 
58
53
  ```python
54
+ # Enable siat
59
55
  from siat import *
60
56
  ```
61
57
 
58
+
59
+ ```python
60
+ # Set language to English, default is Chinese
61
+ set_language("English")
62
+ ```
63
+
62
64
  ## Example 1: Apple stock price for the recent month
63
65
 
64
66
 
65
67
  ```python
68
+ # Simple way: show Apple's stock price in recent month
66
69
  apple=security_trend("AAPL")
67
70
  ```
68
71
  You may expect to more information, such as price trend in a recent year (MRY), with the high/low point, current price and average price, like below:
@@ -96,6 +99,7 @@ comp=security_trend(['AAPL','MSFT','NVDA'],
96
99
  apple=security_technical("AAPL",
97
100
  technical="Bollinger",
98
101
  start="MRQ",
102
+ facecolor="white",
99
103
  loc1="upper left", loc2="lower right")
100
104
  ```
101
105
 
@@ -111,7 +115,7 @@ apple=security_technical2("AAPL",
111
115
  loc1="upper left", loc2="lower right")
112
116
  ```
113
117
 
114
- # What sorts of security product does siat support?
118
+ # What security product does siat support?
115
119
  1. Public company profile: world-wide
116
120
  2. Stock & stock market index: world-wide
117
121
  3. Stock valuation: primarily in China (mainland and HK) and the U.S.
@@ -125,9 +129,9 @@ apple=security_technical2("AAPL",
125
129
  11. Balance sheet: in China (full function) and world-wide (basic function)
126
130
  12. Income statement: in China mainland (full function) and world-wide (basic function)
127
131
  13. Cash flow statement: in China mainland (full function) and world-wide (basic function)
128
- 14. Du Pont Identity: world-wide
132
+ 14. DuPont Identity: world-wide
129
133
  15. Sector trend and valuation: primarily in China
130
- # What sorts of analytical methodology does siat support?
134
+ # What analytical methodology does siat support?
131
135
  1. Trend analysis
132
136
  2. Panel comparation
133
137
  3. Return analysis: rolling returns, holding period returns
@@ -184,9 +188,21 @@ upgrade_siat(alternative="tsinghua")
184
188
 
185
189
  upgrade_siat(alternative="alibaba")
186
190
 
187
- If the above methods do not work for you, you have to goto the traditional ways to use command-line script, such as:
191
+ If the above methods do not work for your environment, you have to goto the traditional ways to use command-line script, such as:
188
192
 
189
193
  pip install --upgrade siat
194
+
195
+ *** For users in China
196
+ The pypi mirror websites may provide siat installing and upgrading in a much faster speed in the following commands: taking aliyun as an example
197
+
198
+ pip install siat -i https://mirrors.aliyun.com/pypi/simple/
199
+
200
+ pip install --upgrade siat https://mirrors.aliyun.com/pypi/simple/
201
+
202
+ *** Warning
203
+ 1. The pip command itself may need upgrade as well.
204
+ 2. The pip command sometimes may have conflicts with some vpn programs.
205
+ If in this case, try quit vpn program, and try again.
190
206
  # Are there more detailed case studies on using siat?
191
207
  YES!
192
208
 
@@ -197,7 +213,3 @@ https://space.bilibili.com/284812153
197
213
  Welcome to follow the channel!
198
214
  # How to report a bug or look for help?
199
215
  Write to the author, Prof. WANG Dehong, wdehong2000@163.com
200
-
201
- ```python
202
-
203
- ```
@@ -18,7 +18,7 @@ siat/capm_beta.py,sha256=cxXdRVBQBllhbfz1LeTJAIWvyRYhW54nhtNUXv4HwS0,29063
18
18
  siat/capm_beta2.py,sha256=lUuCPVSxebkA2yye1PXu1V2Jd2UKEwD_kIA25DCIDTs,29750
19
19
  siat/capm_beta_test.py,sha256=ImR0c5mc4hIl714XmHztdl7qg8v1E2lycKyiqnFj6qs,1745
20
20
  siat/cmat_commons.py,sha256=Nj9Kf0alywaztVoMVeVVL_EZk5jRERJy8R8kBw88_Tg,38116
21
- siat/common.py,sha256=MjnhlSLKXHXT6TaveSZ5_-RuPNjPuUe-GC0RpzRvnnw,151619
21
+ siat/common.py,sha256=UBmP_PES09tiht6K_DlM08BLlXGC-_CFB4FqoCORu9c,151695
22
22
  siat/compare_cross.py,sha256=3iP9TH2h3w27F2ARZc7FjKcErYCzWRc-TPiymOyoVtw,24171
23
23
  siat/compare_cross_test.py,sha256=xra5XYmQGEtfIZL2h-GssdH2hLdFIhG3eoCrkDrL3gY,3473
24
24
  siat/concepts_iwencai.py,sha256=m1YEDtECRT6FqtzlKm91pt2I9d3Z_XoP59BtWdRdu8I,3061
@@ -60,7 +60,7 @@ siat/future_china.py,sha256=F-HsIf2Op8Z22RzTjet1g8COzldgnMjFNSXsAkeGyWo,17595
60
60
  siat/future_china_test.py,sha256=BrSzmDVaOHki6rntOtosmRn-6dkfOBuLulJNqh7MOpc,1163
61
61
  siat/global_index_test.py,sha256=hnFp3wqqzzL-kAP8mgxDZ54Bd5Ijf6ENi5YJlGBgcXw,2402
62
62
  siat/google_authenticator.py,sha256=ZUbZR8OW0IAKDbcYtlqGqIpZdERpFor9NccFELxg9yI,1637
63
- siat/grafix.py,sha256=W5I4IdOm9q7CdDHFSv6xFmfk9sPZXItXC4cCvp2q6mU,87137
63
+ siat/grafix.py,sha256=dFec-2Ds76JEfvsMj2HS-gHcufv3vpsWe4LwpNX_XoM,87219
64
64
  siat/grafix_test.py,sha256=kXvcpLgQNO7wd30g_bWljLj5UH7bIVI0_dUtXbfiKR0,3150
65
65
  siat/holding_risk.py,sha256=G3wpaewAKF9CwEqRpr4khyuDu9SU2EGyQUHdk7cmHOA,30693
66
66
  siat/holding_risk_test.py,sha256=FRlw_9wFG98BYcg_cSj95HX5WZ1TvkGaOUdXD7-V86s,474
@@ -80,9 +80,9 @@ siat/markowitz_test2.py,sha256=FcVZqYU5va4567WGUVUJ7cMQdVbBGxeBAz82Y3BhCTI,2193
80
80
  siat/ml_cases.py,sha256=FYDk0O7l9hhHlbrlOVGgbH-h2DA503lhKFi9XugH1f0,86874
81
81
  siat/ml_cases_example.py,sha256=xRGb3YTQEDTOnaWNzZN_myU5umQnA2RdMNiPrxTmn9c,1673
82
82
  siat/ml_cases_example1.py,sha256=xRGb3YTQEDTOnaWNzZN_myU5umQnA2RdMNiPrxTmn9c,1673
83
- siat/option_china.py,sha256=6ucKhcBeWwwB_O7gg-ZtptPNmcXWKCkYK1_6xCyvzPU,112815
83
+ siat/option_china.py,sha256=0eIWy5-0L8fECVwakVoA8EUO-_5u5jGW66dVLRi1_PY,120954
84
84
  siat/option_china_test.py,sha256=UQ-YUHUjoGBQyanLcM-yzqeEIUQP_gCQIeT0W6rnUnA,16355
85
- siat/option_pricing.py,sha256=KQmdJ5gyOOLTRK4PRT8O8mOOWw3kCJSXAF4YttKCT3k,70268
85
+ siat/option_pricing.py,sha256=8uGzCNcSmLu_99w8qx99oqxvUHUNOZq5LObPffrdtxk,73177
86
86
  siat/option_pricing_test.py,sha256=eeorV5Ja5vjlRXnP6fWJHetGU5Vb8SnLopkC6RV3GfA,2203
87
87
  siat/option_sina_api_test.py,sha256=dn-k_wrQnAaNKHoROvWJEc7lqlU0bwiV2Aa4usWAFGM,5908
88
88
  siat/proxy_test.py,sha256=erQJrmGs2X46z8Gb1h-7GYQ0rTUcaR8dxHExWoBz2eM,2610
@@ -98,7 +98,7 @@ siat/sector_china.py,sha256=nP6kfYsnaQWZj8dK-zklwSDW8FDS-obZWp_zL0ec2Ig,118603
98
98
  siat/sector_china_test.py,sha256=1wq7ef8Bb_L8F0h0W6FvyBrIcBTEbrTV7hljtpj49U4,5843
99
99
  siat/security_price.py,sha256=2oHskgiw41KMGfqtnA0i2YjNNV6cYgtlUK0j3YeuXWs,29185
100
100
  siat/security_price2.py,sha256=65s64L68aRZdVVK3V8UYxdPd_JHMqgJ2FBJJX5MSW-Q,26174
101
- siat/security_prices.py,sha256=2aLBSyVRfcZ1-5jqF_r3N02RvlaNNqssJS9GgxGidgM,106235
101
+ siat/security_prices.py,sha256=ZEnuKgLnkw1O41BpR44Mpq53N69mW3UdSzEnI_4LuPc,106387
102
102
  siat/security_prices_test.py,sha256=OEphoJ87NPKoNow1QA8EU_5MUYrJF-qKoWKNapVfZNI,10779
103
103
  siat/security_trend.py,sha256=o0vpWdrJkmODCP94X-Bvn-w7efHhj9HpUYBHtLl55D0,17240
104
104
  siat/security_trend2-20240620.py,sha256=QVnEcb7AyVbO77jVqfFsJffGXrX8pgJ9xCfoAKmWBPk,24854
@@ -131,7 +131,7 @@ siat/transaction_test.py,sha256=Z8g1LJCN4-mnUByXMUMoFmN0t105cbmsz2QmvSuIkbU,1858
131
131
  siat/translate-20230125.py,sha256=NPPSXhT38s5t9fzMvl_fvi4ckSB73ThLmZetVI-xGdU,117953
132
132
  siat/translate-20230206.py,sha256=-vtI125WyaJhmPotOpDAmclt_XnYVaWU9ByLWZ6FyYE,118133
133
133
  siat/translate-20230215.py,sha256=TJgtPE3n8IjljmZ4Pefy8dmHoNdFF-1zpML6BhA9FKE,121657
134
- siat/translate.py,sha256=_3fOZozd4RsJGJaITSn7Kil4PvmQFGpKVKHbcLRiBZI,218193
134
+ siat/translate.py,sha256=Nspy2Ts2QTqWcqH94BXHO7OjnNvYOCqfPCcwTFoWwxc,218285
135
135
  siat/translate_20240606.py,sha256=63IyHWEU3Uz9mjwyuAX3fqY4nUMdwh0ICQAgmgPXP7Y,215121
136
136
  siat/universal_test.py,sha256=CDAOffW1Rvs-TcNN5giWVvHMlch1w4dp-w5SIV9jXL0,3936
137
137
  siat/valuation.py,sha256=NKfeZMdDJOW42oLVHob6eSVBXUqlN1OCnnzwyGAst8c,48855
@@ -139,7 +139,7 @@ siat/valuation_china.py,sha256=EkZQaVkoBjM0c4MCNbaX-bMnlG0e3FXeaWczZDnkptU,67784
139
139
  siat/valuation_market_china_test.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
140
140
  siat/var_model_validation.py,sha256=R0caWnuZarrRg9939hxh3vJIIpIyPfvelYmzFNZtPbo,14910
141
141
  siat/yf_name.py,sha256=H1EM8YYXA8nQHIqsJlso0I3HKPiJLT3QujO4gRVQXWs,13945
142
- siat-3.4.6.dist-info/METADATA,sha256=Agk7WFoMV7XNYw3oVZAWg1hEo1UmDFKgavjPoVFN0z8,7309
143
- siat-3.4.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
144
- siat-3.4.6.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
145
- siat-3.4.6.dist-info/RECORD,,
142
+ siat-3.4.8.dist-info/METADATA,sha256=za1tq7AU9BmJbNQUSZICpzAQvfJZc4_ThYOCqwcGN2s,7682
143
+ siat-3.4.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
144
+ siat-3.4.8.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
145
+ siat-3.4.8.dist-info/RECORD,,
File without changes