siat 3.10.125__py3-none-any.whl → 3.10.126__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.
Files changed (87) hide show
  1. siat/common.py +106 -2
  2. siat/exchange_bond_china.pickle +0 -0
  3. siat/fund_china.pickle +0 -0
  4. siat/stock.py +10 -2
  5. siat/stock_info.pickle +0 -0
  6. {siat-3.10.125.dist-info → siat-3.10.126.dist-info}/METADATA +234 -226
  7. siat-3.10.126.dist-info/RECORD +76 -0
  8. {siat-3.10.125.dist-info → siat-3.10.126.dist-info}/WHEEL +1 -1
  9. {siat-3.10.125.dist-info → siat-3.10.126.dist-info/licenses}/LICENSE +0 -0
  10. {siat-3.10.125.dist-info → siat-3.10.126.dist-info}/top_level.txt +0 -0
  11. siat/__init__ -20240701.py +0 -65
  12. siat/__init__.py.backup_20250214.py +0 -73
  13. siat/alpha_vantage_test.py +0 -24
  14. siat/assets_liquidity_test.py +0 -44
  15. siat/barrons_scraping_test.py +0 -276
  16. siat/beta_adjustment_test.py +0 -77
  17. siat/bond_test.py +0 -142
  18. siat/capm_beta_test.py +0 -49
  19. siat/cmat_commons.py +0 -961
  20. siat/compare_cross_test.py +0 -117
  21. siat/concepts_iwencai.py +0 -86
  22. siat/concepts_kpl.py +0 -93
  23. siat/cryptocurrency_test.py +0 -71
  24. siat/derivative.py +0 -1111
  25. siat/economy-20230125.py +0 -1206
  26. siat/economy_test.py +0 -360
  27. siat/esg_test.py +0 -63
  28. siat/fama_french_test.py +0 -115
  29. siat/financial_statements_test.py +0 -31
  30. siat/financials2 - /321/205/320/231/320/277/321/206/320/254/320/274.py" +0 -341
  31. siat/financials_china2_test.py +0 -67
  32. siat/financials_china2_test2.py +0 -88
  33. siat/financials_china2_test3.py +0 -87
  34. siat/financials_china_test.py +0 -475
  35. siat/financials_china_test2.py +0 -197
  36. siat/financials_china_test2_fin_indicator.py +0 -197
  37. siat/financials_test.py +0 -713
  38. siat/fred_test.py +0 -40
  39. siat/fund_china_test.py +0 -175
  40. siat/fund_test.py +0 -40
  41. siat/future_china_test.py +0 -37
  42. siat/global_index_test.py +0 -66
  43. siat/grafix_test.py +0 -112
  44. siat/holding_risk_test.py +0 -13
  45. siat/local_debug_test.py +0 -100
  46. siat/markowitz2-20240620.py +0 -2614
  47. siat/markowitz_ccb_test.py +0 -37
  48. siat/markowitz_ef_test.py +0 -136
  49. siat/markowitz_old.py +0 -871
  50. siat/markowitz_simple-20230709.py +0 -370
  51. siat/markowitz_test.py +0 -164
  52. siat/markowitz_test2.py +0 -69
  53. siat/ml_cases_example1.py +0 -60
  54. siat/option_china_test.py +0 -447
  55. siat/option_pricing_test.py +0 -81
  56. siat/option_sina_api_test.py +0 -112
  57. siat/proxy_test.py +0 -84
  58. siat/quandl_test.py +0 -39
  59. siat/risk_adjusted_return_test.py +0 -81
  60. siat/risk_evaluation_test.py +0 -96
  61. siat/risk_free_rate_test.py +0 -127
  62. siat/sector_china_test.py +0 -203
  63. siat/security_price.py +0 -831
  64. siat/security_prices_test.py +0 -310
  65. siat/security_trend2-20240620.py +0 -493
  66. siat/setup.py +0 -41
  67. siat/shenwan index history test.py +0 -41
  68. siat/stock_china_test.py +0 -38
  69. siat/stock_info_test.py +0 -189
  70. siat/stock_list_china_test.py +0 -33
  71. siat/stock_technical-20240620.py +0 -2736
  72. siat/stock_test.py +0 -487
  73. siat/temp.py +0 -36
  74. siat/test2_graphviz.py +0 -484
  75. siat/test_graphviz.py +0 -411
  76. siat/test_markowitz_simple.py +0 -198
  77. siat/test_markowitz_simple_revised.py +0 -215
  78. siat/test_markowitz_simple_revised2.py +0 -218
  79. siat/transaction_test.py +0 -436
  80. siat/translate-20230125.py +0 -2107
  81. siat/translate-20230206.py +0 -2109
  82. siat/translate-20230215.py +0 -2158
  83. siat/translate_20240606.py +0 -4206
  84. siat/translate_241003_keep.py +0 -4300
  85. siat/universal_test.py +0 -100
  86. siat/valuation_market_china_test.py +0 -36
  87. siat-3.10.125.dist-info/RECORD +0 -152
siat/bond_test.py DELETED
@@ -1,142 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- import os; os.chdir("S:/siat")
4
- from siat import *
5
-
6
- #==============================================================================
7
- ytmchanges = [-100, -50, -20, -10, -5, 5, 10, 20, 50, 100]
8
- bond_malkiel1(0.06, 8, 0.07, 100, 2, ytmchanges)
9
-
10
- maturitylist = [1, 2, 3, 5, 10, 15, 20, 30]
11
- bond_malkiel2(0.06, 8, 0.07, 100, 2, maturitylist)
12
-
13
-
14
- bond_malkiel3(0.06, 8, 0.07, 100, 2)
15
-
16
- bond_malkiel4(0.06, 8, 0.07, 100, 2)
17
-
18
- bond_malkiel5(0.06, 8, 0.075, 100, 2)
19
-
20
-
21
- #==============================================================================
22
- md(0.08,0.1,3,2,100)
23
- MD(0.08,0.1,3,2,100)
24
- convexity(0.08,0.1,3,2,100)
25
- #==============================================================================
26
- ibbd=interbank_bond_deal(10)
27
-
28
- ebp=exchange_bond_price('sh019521', '2021-3-1', '2021-5-25',power=0)
29
- ebp=exchange_bond_price('sh122001', '2021-3-1', '2021-5-25',power=0)
30
- #==============================================================================
31
- def abcefg():
32
- """
33
- 功能:获取当前函数名
34
- """
35
- import sys
36
- curfunc=sys._getframe().f_code.co_name #获取当前函数名
37
- print(curfunc)
38
-
39
- uplfunc=sys._getframe(1).f_code.co_name #调用该函数的函数的名字,如果没有被调用,则返回<module>
40
- print(uplfunc)
41
- return
42
-
43
- #==============================================================================
44
- ibbq=interbank_bond_deal(10)
45
- ibbq=interbank_bond_deal(10, option='5')
46
-
47
- #==============================================================================
48
- ebd=exchange_bond_deal(10, option='6')
49
-
50
-
51
- ebp=exchange_bond_price('sh019521', '2019-7-1', '2020-3-31')
52
- ebp=exchange_covbond_price('sz128086','2020-1-1','2020-4-30')
53
-
54
- cbp=country_bond_price('中国','中国1年期国债','2020-1-1','2020-4-30')
55
- cbp=country_bond_price('美国','美国10年期国债','2020-1-1','2020-4-30')
56
- cbp=country_bond_price('意大利','意大利30年期国债','2020-1-1','2020-4-30')
57
-
58
-
59
- #==============================================================================
60
- ibbi=interbank_bond_issue_detail('2012-1-1', '2020-12-31')
61
- ibbim=interbank_bond_issue_monthly(ibbi,'2019-1-1', '2020-12-31')
62
-
63
-
64
- #==============================================================================
65
- if __name__=='__main__':
66
- search_bond_index_china(keystr='债')
67
- search_bond_index_china(keystr='国债')
68
- search_bond_index_china(keystr='综合')
69
- search_bond_index_china(keystr='金融')
70
- search_bond_index_china(keystr='企业')
71
- search_bond_index_china(keystr='公司')
72
- search_bond_index_china(keystr='地方政府债')
73
-
74
- bond_index_china('中债-综合指数','2020-1-1','2021-2-8')
75
- bond_index_china('中债-国债总指数','2020-1-1','2021-2-8')
76
- bond_index_china('中债-交易所国债指数','2020-1-1','2021-2-8')
77
- bond_index_china('中债-银行间国债指数','2010-1-1','2021-2-8')
78
- bond_index_china('中债-银行间债券总指数','2020-1-1','2021-2-8')
79
-
80
- bond_index_china('中债-5年期国债指数','2020-1-1','2021-2-8')
81
- bond_index_china('中债-0-3个月国债指数','2020-1-1','2021-2-8')
82
-
83
-
84
-
85
-
86
- #==============================================================================
87
- import os; os.chdir("S:/siat")
88
- from siat.stock import *
89
-
90
- compare_security(["300148.SZ","000001.SS"],"Close","2000-1-1","2020-6-30",twinx=True)
91
-
92
- compare_security(["FRI","^GSPC"],"Exp Adj Ret%","2010-1-1","2020-6-30")
93
-
94
- compare_security(["FRI","^GSPC"],"Exp Adj Ret Volatility%","2010-1-1","2020-6-30")
95
-
96
- compare_security(["ICF","^DJI"],"Exp Adj Ret%","2010-1-1","2020-6-30")
97
-
98
- compare_security(["ICF","^DJI"],"Exp Adj Ret Volatility%","2010-1-1","2020-6-30")
99
-
100
-
101
-
102
- info=stock_price("510050.SS","2020-4-1","2020-6-30")
103
- info=stock_price("510210.SS","2020-4-1","2020-6-30")
104
-
105
- compare_security(["510210.SS","000001.SS"],"Close","2020-4-1","2020-6-30",twinx=True)
106
-
107
- compare_security(["510210.SS","000001.SS"],"Close","2015-7-1","2020-6-30",twinx=True)
108
-
109
- compare_security(["SPY","^GSPC"],"Exp Ret%","2010-1-1","2020-6-30")
110
-
111
- compare_security(["VOO","^GSPC"],"Exp Ret%","2010-1-1","2020-6-30")
112
-
113
- compare_security(["IVV","^GSPC"],"Exp Ret%","2010-1-1","2020-6-30")
114
-
115
- compare_security(["SPY","^GSPC"],"Exp Ret Volatility%","2010-1-1","2020-6-30")
116
-
117
- compare_security(["VOO","^GSPC"],"Exp Ret Volatility%","2010-1-1","2020-6-30")
118
-
119
- compare_security(["IVV","^GSPC"],"Exp Ret Volatility%","2010-1-1","2020-6-30")
120
-
121
- compare_security(["SPY","SPYD"],"Exp Ret%","2019-1-1","2020-6-30")
122
-
123
- compare_security(["SPY","SPYG"],"Exp Ret%","2019-1-1","2020-6-30")
124
-
125
- compare_security(["SPY","SPYV"],"Exp Ret%","2019-1-1","2020-6-30")
126
-
127
-
128
- compare_security(["SPY","SPYD"],"Exp Ret Volatility%","2019-1-1","2020-6-30")
129
-
130
- compare_security(["SPY","SPYG"],"Exp Ret Volatility%","2019-1-1","2020-6-30")
131
-
132
- compare_security(["SPY","SPYV"],"Exp Ret Volatility%","2019-1-1","2020-6-30")
133
-
134
-
135
-
136
- fsym = "ETH"; tsym = "USD"
137
- begdate="2020-03-01"; enddate="2020-05-31"
138
- markets=fetchCrypto_Exchange(fsym,tsym)
139
- cp=fetchCrypto_Price_byExchList(fsym,tsym,markets,begdate,enddate)
140
- dist1,dist2=calcSpread_in2Markets(cp)
141
- print("Average inter-market spread:", dist1)
142
- print("Inter-market spread volatility:", dist2)
siat/capm_beta_test.py DELETED
@@ -1,49 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- import os; os.chdir("S:/siat")
4
- from siat import *
5
- #==============================================================================
6
- beta=capm_beta('600519.SS','000001.SS','2011-1-1','2021-12-31')
7
-
8
-
9
-
10
- #==============================================================================
11
- beta=capm_beta('AAPL','^GSPC','2016-1-1','2020-12-31')
12
-
13
- yearlist=gen_yearlist('2016','2020')
14
- betas=capm_beta_yearly('AAPL','^GSPC',yearlist)
15
- betas=capm_beta_yearly('600000.SS','000001.SS',yearlist)
16
-
17
- #==============================================================================
18
- portfolio=['IBM','AAPL','MSFT']
19
- holdings=[1, 1, 3]
20
- yearlist=gen_yearlist('2010','2020')
21
- df=capm_beta_portfolio_yearly(portfolio,holdings,'^GSPC',yearlist)
22
-
23
- #==============================================================================
24
- beta=capm_beta('600000.SS','000001.SS','2011-1-1','2020-12-31')
25
-
26
- portfolio=['IBM','AAPL','MSFT']
27
- holdings=[1, 1, 3]
28
- yearlist=gen_yearlist('2010','2020')
29
- df=capm_beta_portfolio_yearly(portfolio,holdings,'^GSPC',yearlist)
30
-
31
- from siat.beta_adjustment import *
32
- yearlist=gen_yearlist('2011','2020')
33
- betas=betas_dji=get_beta_ML('EDU','^DJI',yearlist)
34
-
35
- #==============================================================================
36
- beta=capm_beta('AAPL','^GSPC','2011-1-1','2020-12-31')
37
-
38
- yearlist=gen_yearlist('2011','2020')
39
- betas=capm_beta_yearly('AAPL','^GSPC',yearlist)
40
-
41
- yearlist=gen_yearlist('2010', '2020')
42
- betas=capm_beta_yearly('600000.SS', '000001.SS', yearlist)
43
-
44
- yearlist=gen_yearlist('2010','2021')
45
- betas=compare2_betas_yearly('600000.SS','600030.SS','000001.SS',yearlist)
46
- betas
47
-
48
- yearlist=gen_yearlist('2010','2020')
49
- betas=compare2_betas_yearly('AMZN','BAC','^GSPC',yearlist)