stpstone 0.1.0__tar.gz
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.
- stpstone-0.1.0/LICENSE +13 -0
- stpstone-0.1.0/PKG-INFO +373 -0
- stpstone-0.1.0/README.md +302 -0
- stpstone-0.1.0/pyproject.toml +70 -0
- stpstone-0.1.0/stpstone/airflow/plugins.py +19 -0
- stpstone-0.1.0/stpstone/cals/br_bzdays.py +733 -0
- stpstone-0.1.0/stpstone/cals/handling_dates.py +593 -0
- stpstone-0.1.0/stpstone/cals/usa_bzdays.py +75 -0
- stpstone-0.1.0/stpstone/charts/general_funcs.py +24 -0
- stpstone-0.1.0/stpstone/charts/prob_and_stats.py +445 -0
- stpstone-0.1.0/stpstone/charts/risk_management.py +72 -0
- stpstone-0.1.0/stpstone/charts/stock_market.py +48 -0
- stpstone-0.1.0/stpstone/charts/tsir.py +26 -0
- stpstone-0.1.0/stpstone/cloud_clients/aws_s3.py +107 -0
- stpstone-0.1.0/stpstone/document_numbers/br.py +93 -0
- stpstone-0.1.0/stpstone/dsa/trees/b_tree.py +297 -0
- stpstone-0.1.0/stpstone/equity_consolidation/banks.py +195 -0
- stpstone-0.1.0/stpstone/finance/anbima/abimadata_api.py +511 -0
- stpstone-0.1.0/stpstone/finance/anbima/anbima_mtm.py +197 -0
- stpstone-0.1.0/stpstone/finance/anbima/anbima_stats.py +143 -0
- stpstone-0.1.0/stpstone/finance/anbima/anbimadev.py +137 -0
- stpstone-0.1.0/stpstone/finance/auditing/earnings_manipulation.py +48 -0
- stpstone-0.1.0/stpstone/finance/b3/cei.py +190 -0
- stpstone-0.1.0/stpstone/finance/b3/core.py +46 -0
- stpstone-0.1.0/stpstone/finance/b3/inoa.py +136 -0
- stpstone-0.1.0/stpstone/finance/b3/line.py +878 -0
- stpstone-0.1.0/stpstone/finance/b3/margin_simulator.py +66 -0
- stpstone-0.1.0/stpstone/finance/b3/market_data.py +1681 -0
- stpstone-0.1.0/stpstone/finance/b3/search_by_trading.py +1334 -0
- stpstone-0.1.0/stpstone/finance/b3/up2data_web.py +468 -0
- stpstone-0.1.0/stpstone/finance/comdinheiro/api_request.py +20 -0
- stpstone-0.1.0/stpstone/finance/cvm/cvm_data.py +306 -0
- stpstone-0.1.0/stpstone/finance/cvm/cvm_web.py +603 -0
- stpstone-0.1.0/stpstone/finance/dadosdemercado_site/api_request.py +124 -0
- stpstone-0.1.0/stpstone/finance/debentures/pricing.py +8 -0
- stpstone-0.1.0/stpstone/finance/derivatives/forward.py +19 -0
- stpstone-0.1.0/stpstone/finance/derivatives/futures.py +263 -0
- stpstone-0.1.0/stpstone/finance/derivatives/options/american.py +87 -0
- stpstone-0.1.0/stpstone/finance/derivatives/options/european.py +1408 -0
- stpstone-0.1.0/stpstone/finance/financial_risk/capital_risk.py +53 -0
- stpstone-0.1.0/stpstone/finance/financial_risk/liquidity_risk.py +119 -0
- stpstone-0.1.0/stpstone/finance/financial_risk/market_risk.py +1016 -0
- stpstone-0.1.0/stpstone/finance/financial_risk/yield_risk.py +174 -0
- stpstone-0.1.0/stpstone/finance/macroeconomics/br_macro.py +478 -0
- stpstone-0.1.0/stpstone/finance/macroeconomics/global_rates.py +228 -0
- stpstone-0.1.0/stpstone/finance/macroeconomics/usa_macro.py +208 -0
- stpstone-0.1.0/stpstone/finance/macroeconomics/world_gov_bonds.py +439 -0
- stpstone-0.1.0/stpstone/finance/performance_apprraisal/company_return.py +26 -0
- stpstone-0.1.0/stpstone/finance/performance_apprraisal/financial_math.py +78 -0
- stpstone-0.1.0/stpstone/finance/reuters/api_request.py +65 -0
- stpstone-0.1.0/stpstone/finance/spot/stocks.py +112 -0
- stpstone-0.1.0/stpstone/finance/tesouro_direto/calculadora.py +393 -0
- stpstone-0.1.0/stpstone/finance/tesouro_direto/consulta_dados.py +98 -0
- stpstone-0.1.0/stpstone/geography/br.py +63 -0
- stpstone-0.1.0/stpstone/handling_data/dicts.py +260 -0
- stpstone-0.1.0/stpstone/handling_data/folders.py +520 -0
- stpstone-0.1.0/stpstone/handling_data/html.py +364 -0
- stpstone-0.1.0/stpstone/handling_data/img.py +19 -0
- stpstone-0.1.0/stpstone/handling_data/json.py +88 -0
- stpstone-0.1.0/stpstone/handling_data/lists.py +435 -0
- stpstone-0.1.0/stpstone/handling_data/lxml.py +18 -0
- stpstone-0.1.0/stpstone/handling_data/numbers.py +186 -0
- stpstone-0.1.0/stpstone/handling_data/object.py +20 -0
- stpstone-0.1.0/stpstone/handling_data/pd.py +246 -0
- stpstone-0.1.0/stpstone/handling_data/pdf.py +77 -0
- stpstone-0.1.0/stpstone/handling_data/pickle.py +42 -0
- stpstone-0.1.0/stpstone/handling_data/str.py +439 -0
- stpstone-0.1.0/stpstone/handling_data/tgz.py +47 -0
- stpstone-0.1.0/stpstone/handling_data/txt.py +57 -0
- stpstone-0.1.0/stpstone/handling_data/xml.py +68 -0
- stpstone-0.1.0/stpstone/llms/gpt.py +75 -0
- stpstone-0.1.0/stpstone/loggs/create_logs.py +125 -0
- stpstone-0.1.0/stpstone/loggs/db_logs.py +20 -0
- stpstone-0.1.0/stpstone/meta/validate_pm.py +37 -0
- stpstone-0.1.0/stpstone/microsoft_apps/cmd.py +18 -0
- stpstone-0.1.0/stpstone/microsoft_apps/excel.py +751 -0
- stpstone-0.1.0/stpstone/microsoft_apps/onedrive.py +25 -0
- stpstone-0.1.0/stpstone/microsoft_apps/outlook.py +289 -0
- stpstone-0.1.0/stpstone/microsoft_apps/windows_os.py +69 -0
- stpstone-0.1.0/stpstone/multithreading/mp_helper.py +43 -0
- stpstone-0.1.0/stpstone/opening_config/setup.py +39 -0
- stpstone-0.1.0/stpstone/pool_conn/dabricksCLI.py +148 -0
- stpstone-0.1.0/stpstone/pool_conn/databricks.py +100 -0
- stpstone-0.1.0/stpstone/pool_conn/generic.py +32 -0
- stpstone-0.1.0/stpstone/pool_conn/mongodb.py +101 -0
- stpstone-0.1.0/stpstone/pool_conn/mysql.py +106 -0
- stpstone-0.1.0/stpstone/pool_conn/postgresql.py +165 -0
- stpstone-0.1.0/stpstone/pool_conn/redis.py +76 -0
- stpstone-0.1.0/stpstone/pool_conn/session.py +263 -0
- stpstone-0.1.0/stpstone/pool_conn/sqlite.py +124 -0
- stpstone-0.1.0/stpstone/pool_conn/sqlserver.py +42 -0
- stpstone-0.1.0/stpstone/quantitative_methods/calculus.py +122 -0
- stpstone-0.1.0/stpstone/quantitative_methods/classification.py +323 -0
- stpstone-0.1.0/stpstone/quantitative_methods/data_cleaning.py +279 -0
- stpstone-0.1.0/stpstone/quantitative_methods/eda.py +159 -0
- stpstone-0.1.0/stpstone/quantitative_methods/features_selecting.py +339 -0
- stpstone-0.1.0/stpstone/quantitative_methods/fit_assessment.py +199 -0
- stpstone-0.1.0/stpstone/quantitative_methods/interpolation.py +82 -0
- stpstone-0.1.0/stpstone/quantitative_methods/linear_algebra.py +166 -0
- stpstone-0.1.0/stpstone/quantitative_methods/prob_distributions.py +491 -0
- stpstone-0.1.0/stpstone/quantitative_methods/regression.py +428 -0
- stpstone-0.1.0/stpstone/quantitative_methods/root.py +52 -0
- stpstone-0.1.0/stpstone/quantitative_methods/sequences.py +143 -0
- stpstone-0.1.0/stpstone/quantitative_methods/statistical_description.py +116 -0
- stpstone-0.1.0/stpstone/quantitative_methods/statistical_inference.py +687 -0
- stpstone-0.1.0/stpstone/sendgrid/handling_sendgrid.py +25 -0
- stpstone-0.1.0/stpstone/settings/_global_slots.py +30 -0
- stpstone-0.1.0/stpstone/settings/anbima.yaml +120 -0
- stpstone-0.1.0/stpstone/settings/b3.yaml +423 -0
- stpstone-0.1.0/stpstone/settings/br_macro.yaml +18 -0
- stpstone-0.1.0/stpstone/settings/br_treasury.yaml +73 -0
- stpstone-0.1.0/stpstone/settings/comdinheiro.yaml +23 -0
- stpstone-0.1.0/stpstone/settings/generic.yaml +12 -0
- stpstone-0.1.0/stpstone/settings/global_rates.yaml +48 -0
- stpstone-0.1.0/stpstone/settings/inoa.yaml +22 -0
- stpstone-0.1.0/stpstone/settings/llms.yaml +11 -0
- stpstone-0.1.0/stpstone/settings/microsoft_apps.yaml +8 -0
- stpstone-0.1.0/stpstone/settings/session.yaml +7 -0
- stpstone-0.1.0/stpstone/settings/usa_macro.yaml +6 -0
- stpstone-0.1.0/stpstone/settings/world_gov_bonds.yaml +37 -0
- stpstone-0.1.0/stpstone/trading_platforms/mt5.py +296 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/.gitignore +8 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/.travis.yml +23 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/CHANGELOG.md +44 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/CONTRIBUTING.md +131 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/LICENSE +23 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/MANIFEST.in +2 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/README.md +156 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/requirements-dev.txt +6 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/setup.cfg +2 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/setup.py +37 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/__init__.py +23 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/client.py +48 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/constants.py +36 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/dealing_tf.py +84 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/forms.py +74 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/responses.py +40 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/test/__init__.py +0 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/test/fixtures.py +4 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/test/suite.py +6 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/test/test_client.py +27 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/test/test_forms.py +180 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/test/test_responses.py +99 -0
- stpstone-0.1.0/stpstone/typeform_sdk_master/typeform/utils.py +31 -0
- stpstone-0.1.0/stpstone/webhooks/slack.py +37 -0
- stpstone-0.1.0/stpstone/webhooks/teams.py +23 -0
stpstone-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Your Name
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies
|
stpstone-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: stpstone
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary:
|
|
5
|
+
Author: guilhermegor
|
|
6
|
+
Author-email: guirodrigues.gor@gmail.com
|
|
7
|
+
Requires-Python: >=3.9,<4.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Requires-Dist: asyncio (==3.4.3)
|
|
15
|
+
Requires-Dist: basicauth (==0.4.1)
|
|
16
|
+
Requires-Dist: bolsa (==2.0.0)
|
|
17
|
+
Requires-Dist: boto3 (==1.35.68)
|
|
18
|
+
Requires-Dist: bs4 (==0.0.1)
|
|
19
|
+
Requires-Dist: businesstimedelta (==1.0.1)
|
|
20
|
+
Requires-Dist: cvxopt (==1.3.0.1)
|
|
21
|
+
Requires-Dist: fpdf (==1.7.2)
|
|
22
|
+
Requires-Dist: ftfy (==6.1.3)
|
|
23
|
+
Requires-Dist: investpy (==1.0.3)
|
|
24
|
+
Requires-Dist: joblib (==1.4.2)
|
|
25
|
+
Requires-Dist: keyring (==24.3.1)
|
|
26
|
+
Requires-Dist: lxml (==4.9.3)
|
|
27
|
+
Requires-Dist: metatrader5 (==5.0.36)
|
|
28
|
+
Requires-Dist: mlxtend (==0.23.1)
|
|
29
|
+
Requires-Dist: more-itertools (==9.1.0)
|
|
30
|
+
Requires-Dist: nelson-siegel-svensson (==0.4.2)
|
|
31
|
+
Requires-Dist: numpy (>=1.26.0,<2.0.0)
|
|
32
|
+
Requires-Dist: numpy-financial (==1.0.0)
|
|
33
|
+
Requires-Dist: pandas (==2.1.2)
|
|
34
|
+
Requires-Dist: pathlib (==1.0.1)
|
|
35
|
+
Requires-Dist: plotly (==5.14.1)
|
|
36
|
+
Requires-Dist: pre-commit (>=4.0.1,<5.0.0)
|
|
37
|
+
Requires-Dist: psycopg2 (==2.8.6)
|
|
38
|
+
Requires-Dist: py7zr (==0.16.2)
|
|
39
|
+
Requires-Dist: pycurl (==7.45.3)
|
|
40
|
+
Requires-Dist: pymsteams (==0.1.14)
|
|
41
|
+
Requires-Dist: pymysql (==1.1.1)
|
|
42
|
+
Requires-Dist: pynubank (==2.17.0)
|
|
43
|
+
Requires-Dist: pyodbc (==4.0.35)
|
|
44
|
+
Requires-Dist: pypdf2 (==1.27.5)
|
|
45
|
+
Requires-Dist: python-dateutil (==2.8.2)
|
|
46
|
+
Requires-Dist: pytz (==2024.1)
|
|
47
|
+
Requires-Dist: pywin32 (==300)
|
|
48
|
+
Requires-Dist: pyyaml (==5.4.1)
|
|
49
|
+
Requires-Dist: requests (==2.31.0)
|
|
50
|
+
Requires-Dist: seaborn (==0.11.1)
|
|
51
|
+
Requires-Dist: selenium (==3.141.0)
|
|
52
|
+
Requires-Dist: sendgrid (==6.11.0)
|
|
53
|
+
Requires-Dist: sklearn (==0.0)
|
|
54
|
+
Requires-Dist: slack (==0.0.2)
|
|
55
|
+
Requires-Dist: sqlalchemy (==1.4.52)
|
|
56
|
+
Requires-Dist: statistics (==1.0.3.5)
|
|
57
|
+
Requires-Dist: statsmodels (==0.14.1)
|
|
58
|
+
Requires-Dist: sympy (==1.9)
|
|
59
|
+
Requires-Dist: tabula (==1.0.5)
|
|
60
|
+
Requires-Dist: typeform (==1.1.0)
|
|
61
|
+
Requires-Dist: typing (==3.7.4.3)
|
|
62
|
+
Requires-Dist: unidecode (==1.2.0)
|
|
63
|
+
Requires-Dist: urllib3 (==1.26.3)
|
|
64
|
+
Requires-Dist: validate-docbr (==1.10.0)
|
|
65
|
+
Requires-Dist: wget (==3.2)
|
|
66
|
+
Requires-Dist: workalendar (==15.0.1)
|
|
67
|
+
Requires-Dist: xlwt (==1.3.0)
|
|
68
|
+
Requires-Dist: yahooquery (==2.3.2)
|
|
69
|
+
Requires-Dist: yfinance (==0.1.70)
|
|
70
|
+
Description-Content-Type: text/markdown
|
|
71
|
+
|
|
72
|
+
# Stpstone
|
|
73
|
+
|
|
74
|
+
* Stylized name, shortened spelling of stepping stone;
|
|
75
|
+
* A Python framework for ingesting and interpreting structured and unstructured financial data, designed to optimize quantitative methods in financial markets.
|
|
76
|
+
|
|
77
|
+
## Key Features
|
|
78
|
+
|
|
79
|
+
* Data Extraction: Retrieve market data from various sources such as B3, CVM, and BACEN (Olinda);
|
|
80
|
+
* Quantitative Methods: Supports a range of quantitative techniques, including portfolio optimization, risk management, and financial modeling;
|
|
81
|
+
* Derivatives Pricing: Implements both closed-form solutions (e.g., Black-Scholes model) and open-form, iterative methods (e.g., Binomial Tree model) for pricing derivatives;
|
|
82
|
+
* Data Treatment: Tools for cleaning, structuring, and transforming raw financial data into usable formats for analysis;
|
|
83
|
+
* Data Loading: Seamlessly integrates with databases such as PostgreSQL, MySQL, and SQLite.
|
|
84
|
+
|
|
85
|
+
## Project Structure
|
|
86
|
+
|
|
87
|
+
stpstone
|
|
88
|
+
├── airflow
|
|
89
|
+
│ └── plugins.py
|
|
90
|
+
├── cals
|
|
91
|
+
│ ├── br_bzdays.py
|
|
92
|
+
│ ├── handling_dates.py
|
|
93
|
+
│ └── usa_bzdays.py
|
|
94
|
+
├── charts
|
|
95
|
+
│ ├── general_funcs.py
|
|
96
|
+
│ ├── prob_and_stats.py
|
|
97
|
+
│ ├── risk_management.py
|
|
98
|
+
│ ├── stock_market.py
|
|
99
|
+
│ └── tsir.py
|
|
100
|
+
├── cloud_clients
|
|
101
|
+
│ └── aws_s3.py
|
|
102
|
+
├── document_numbers
|
|
103
|
+
│ └── br.py
|
|
104
|
+
├── dsa
|
|
105
|
+
│ └── trees
|
|
106
|
+
│ └── b_tree.py
|
|
107
|
+
├── equity_consolidation
|
|
108
|
+
│ └── banks.py
|
|
109
|
+
├── finance
|
|
110
|
+
│ ├── anbima
|
|
111
|
+
│ │ ├── abimadata_api.py
|
|
112
|
+
│ │ ├── anbima_mtm.py
|
|
113
|
+
│ │ ├── anbima_stats.py
|
|
114
|
+
│ │ └── anbimadev.py
|
|
115
|
+
│ ├── auditing
|
|
116
|
+
│ │ └── earnings_manipulation.py
|
|
117
|
+
│ ├── b3
|
|
118
|
+
│ │ ├── cei.py
|
|
119
|
+
│ │ ├── core.py
|
|
120
|
+
│ │ ├── inoa.py
|
|
121
|
+
│ │ ├── line.py
|
|
122
|
+
│ │ ├── margin_simulator.py
|
|
123
|
+
│ │ ├── market_data.py
|
|
124
|
+
│ │ ├── search_by_trading.py
|
|
125
|
+
│ │ └── up2data_web.py
|
|
126
|
+
│ ├── comdinheiro
|
|
127
|
+
│ │ └── api_request.py
|
|
128
|
+
│ ├── cvm
|
|
129
|
+
│ │ ├── cvm_data.py
|
|
130
|
+
│ │ └── cvm_web.py
|
|
131
|
+
│ ├── dadosdemercado_site
|
|
132
|
+
│ │ └── api_request.py
|
|
133
|
+
│ ├── debentures
|
|
134
|
+
│ │ └── pricing.py
|
|
135
|
+
│ ├── derivatives
|
|
136
|
+
│ │ ├── forward.py
|
|
137
|
+
│ │ ├── futures.py
|
|
138
|
+
│ │ └── options
|
|
139
|
+
│ │ ├── american.py
|
|
140
|
+
│ │ └── european.py
|
|
141
|
+
│ ├── financial_risk
|
|
142
|
+
│ │ ├── capital_risk.py
|
|
143
|
+
│ │ ├── liquidity_risk.py
|
|
144
|
+
│ │ ├── market_risk.py
|
|
145
|
+
│ │ └── yield_risk.py
|
|
146
|
+
│ ├── macroeconomics
|
|
147
|
+
│ │ ├── br_macro.py
|
|
148
|
+
│ │ ├── global_rates.py
|
|
149
|
+
│ │ ├── usa_macro.py
|
|
150
|
+
│ │ └── world_gov_bonds.py
|
|
151
|
+
│ ├── performance_apprraisal
|
|
152
|
+
│ │ ├── company_return.py
|
|
153
|
+
│ │ └── financial_math.py
|
|
154
|
+
│ ├── reuters
|
|
155
|
+
│ │ └── api_request.py
|
|
156
|
+
│ ├── spot
|
|
157
|
+
│ │ └── stocks.py
|
|
158
|
+
│ └── tesouro_direto
|
|
159
|
+
│ ├── calculadora.py
|
|
160
|
+
│ └── consulta_dados.py
|
|
161
|
+
├── geography
|
|
162
|
+
│ └── br.py
|
|
163
|
+
├── handling_data
|
|
164
|
+
│ ├── dicts.py
|
|
165
|
+
│ ├── folders.py
|
|
166
|
+
│ ├── html.py
|
|
167
|
+
│ ├── img.py
|
|
168
|
+
│ ├── json.py
|
|
169
|
+
│ ├── lists.py
|
|
170
|
+
│ ├── lxml.py
|
|
171
|
+
│ ├── numbers.py
|
|
172
|
+
│ ├── object.py
|
|
173
|
+
│ ├── pd.py
|
|
174
|
+
│ ├── pdf.py
|
|
175
|
+
│ ├── pickle.py
|
|
176
|
+
│ ├── str.py
|
|
177
|
+
│ ├── tgz.py
|
|
178
|
+
│ ├── txt.py
|
|
179
|
+
│ └── xml.py
|
|
180
|
+
├── llms
|
|
181
|
+
│ └── gpt.py
|
|
182
|
+
├── loggs
|
|
183
|
+
│ ├── create_logs.py
|
|
184
|
+
│ └── db_logs.py
|
|
185
|
+
├── meta
|
|
186
|
+
│ └── validate_pm.py
|
|
187
|
+
├── microsoft_apps
|
|
188
|
+
│ ├── cmd.py
|
|
189
|
+
│ ├── excel.py
|
|
190
|
+
│ ├── onedrive.py
|
|
191
|
+
│ ├── outlook.py
|
|
192
|
+
│ └── windows_os.py
|
|
193
|
+
├── multithreading
|
|
194
|
+
│ └── mp_helper.py
|
|
195
|
+
├── opening_config
|
|
196
|
+
│ └── setup.py
|
|
197
|
+
├── pool_conn
|
|
198
|
+
│ ├── dabricksCLI.py
|
|
199
|
+
│ ├── databricks.py
|
|
200
|
+
│ ├── generic.py
|
|
201
|
+
│ ├── mongodb.py
|
|
202
|
+
│ ├── mysql.py
|
|
203
|
+
│ ├── postgresql.py
|
|
204
|
+
│ ├── redis.py
|
|
205
|
+
│ ├── session.py
|
|
206
|
+
│ ├── sqlite.py
|
|
207
|
+
│ └── sqlserver.py
|
|
208
|
+
├── quantitative_methods
|
|
209
|
+
│ ├── calculus.py
|
|
210
|
+
│ ├── classification.py
|
|
211
|
+
│ ├── data_cleaning.py
|
|
212
|
+
│ ├── eda.py
|
|
213
|
+
│ ├── features_selecting.py
|
|
214
|
+
│ ├── fit_assessment.py
|
|
215
|
+
│ ├── interpolation.py
|
|
216
|
+
│ ├── linear_algebra.py
|
|
217
|
+
│ ├── prob_distributions.py
|
|
218
|
+
│ ├── regression.py
|
|
219
|
+
│ ├── root.py
|
|
220
|
+
│ ├── sequences.py
|
|
221
|
+
│ ├── statistical_description.py
|
|
222
|
+
│ └── statistical_inference.py
|
|
223
|
+
├── sendgrid
|
|
224
|
+
│ └── handling_sendgrid.py
|
|
225
|
+
├── settings
|
|
226
|
+
│ ├── _global_slots.py
|
|
227
|
+
│ ├── anbima.yaml
|
|
228
|
+
│ ├── b3.yaml
|
|
229
|
+
│ ├── br_macro.yaml
|
|
230
|
+
│ ├── br_treasury.yaml
|
|
231
|
+
│ ├── comdinheiro.yaml
|
|
232
|
+
│ ├── generic.yaml
|
|
233
|
+
│ ├── global_rates.yaml
|
|
234
|
+
│ ├── inoa.yaml
|
|
235
|
+
│ ├── llms.yaml
|
|
236
|
+
│ ├── microsoft_apps.yaml
|
|
237
|
+
│ ├── session.yaml
|
|
238
|
+
│ ├── usa_macro.yaml
|
|
239
|
+
│ └── world_gov_bonds.yaml
|
|
240
|
+
├── trading_platforms
|
|
241
|
+
│ └── mt5.py
|
|
242
|
+
├── typeform_sdk_master
|
|
243
|
+
│ ├── CHANGELOG.md
|
|
244
|
+
│ ├── CONTRIBUTING.md
|
|
245
|
+
│ ├── LICENSE
|
|
246
|
+
│ ├── MANIFEST.in
|
|
247
|
+
│ ├── README.md
|
|
248
|
+
│ ├── requirements-dev.txt
|
|
249
|
+
│ ├── setup.cfg
|
|
250
|
+
│ ├── setup.py
|
|
251
|
+
│ └── typeform
|
|
252
|
+
│ ├── __init__.py
|
|
253
|
+
│ ├── client.py
|
|
254
|
+
│ ├── constants.py
|
|
255
|
+
│ ├── dealing_tf.py
|
|
256
|
+
│ ├── forms.py
|
|
257
|
+
│ ├── responses.py
|
|
258
|
+
│ ├── test
|
|
259
|
+
│ │ ├── __init__.py
|
|
260
|
+
│ │ ├── fixtures.py
|
|
261
|
+
│ │ ├── suite.py
|
|
262
|
+
│ │ ├── test_client.py
|
|
263
|
+
│ │ ├── test_forms.py
|
|
264
|
+
│ │ └── test_responses.py
|
|
265
|
+
│ └── utils.py
|
|
266
|
+
└── webhooks
|
|
267
|
+
├── slack.py
|
|
268
|
+
└── teams.py
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
## Getting Started
|
|
274
|
+
|
|
275
|
+
These instructions will get you a copy of the project running on your local machine for development and testing purposes.
|
|
276
|
+
|
|
277
|
+
### Prerequisites
|
|
278
|
+
|
|
279
|
+
* Python ^3.9.13
|
|
280
|
+
|
|
281
|
+
### Installing
|
|
282
|
+
|
|
283
|
+
* Pyenv for Python ^3.9.13 local installation:
|
|
284
|
+
|
|
285
|
+
```powershell
|
|
286
|
+
(PowerShell)
|
|
287
|
+
|
|
288
|
+
Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
(bash)
|
|
293
|
+
|
|
294
|
+
echo installing local version of python within project
|
|
295
|
+
cd "complete/path/to/project"
|
|
296
|
+
pyenv install 3.9.13
|
|
297
|
+
pyenv versions
|
|
298
|
+
pyenv global 3.9.13
|
|
299
|
+
pyenv local 3.9.13
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
* Activate poetry .venv
|
|
303
|
+
```bash
|
|
304
|
+
(bash)
|
|
305
|
+
|
|
306
|
+
echo defining local pyenv version
|
|
307
|
+
pyenv local 3.9.13
|
|
308
|
+
pyenv which python
|
|
309
|
+
poetry env use "COMPLETE_PATH_PY_3.9.13"
|
|
310
|
+
echo check python version running locally
|
|
311
|
+
poetry run py --version
|
|
312
|
+
|
|
313
|
+
echo installing poetry .venv
|
|
314
|
+
poetry init
|
|
315
|
+
poery install --no-root
|
|
316
|
+
|
|
317
|
+
echo running current .venv
|
|
318
|
+
poetry shell
|
|
319
|
+
poetry add <package name, optionally version>
|
|
320
|
+
poetry run <module.py>
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Running the Tests
|
|
324
|
+
|
|
325
|
+
* EDA - Exploratory Data Analysis:
|
|
326
|
+
```(bash)
|
|
327
|
+
|
|
328
|
+
(bash)
|
|
329
|
+
|
|
330
|
+
cd "complete/path/to/project"
|
|
331
|
+
poetry run python stpstone.tests.eda.py
|
|
332
|
+
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
* European / American Options:
|
|
336
|
+
```(bash)
|
|
337
|
+
|
|
338
|
+
(bash)
|
|
339
|
+
|
|
340
|
+
cd "complete/path/to/project"
|
|
341
|
+
poetry run python tests.european-american-options.py
|
|
342
|
+
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
* Markowitz Portfolios:
|
|
346
|
+
```(bash)
|
|
347
|
+
|
|
348
|
+
(bash)
|
|
349
|
+
|
|
350
|
+
cd "complete/path/to/project"
|
|
351
|
+
poetry run python tests.markowitz-portfolios.py
|
|
352
|
+
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
## Authors
|
|
357
|
+
|
|
358
|
+
**Guilherme Rodrigues**
|
|
359
|
+
* [GitHub](https://github.com/guilhermegor)
|
|
360
|
+
* [LinkedIn](https://www.linkedin.com/in/guilhermegor/)
|
|
361
|
+
|
|
362
|
+
## License
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
## Acknowledgments
|
|
366
|
+
|
|
367
|
+
* Hat tip to anyone whose code was used
|
|
368
|
+
* Inspiration
|
|
369
|
+
* etc
|
|
370
|
+
|
|
371
|
+
## Inspirations
|
|
372
|
+
|
|
373
|
+
* [Gist](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2)
|
stpstone-0.1.0/README.md
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# Stpstone
|
|
2
|
+
|
|
3
|
+
* Stylized name, shortened spelling of stepping stone;
|
|
4
|
+
* A Python framework for ingesting and interpreting structured and unstructured financial data, designed to optimize quantitative methods in financial markets.
|
|
5
|
+
|
|
6
|
+
## Key Features
|
|
7
|
+
|
|
8
|
+
* Data Extraction: Retrieve market data from various sources such as B3, CVM, and BACEN (Olinda);
|
|
9
|
+
* Quantitative Methods: Supports a range of quantitative techniques, including portfolio optimization, risk management, and financial modeling;
|
|
10
|
+
* Derivatives Pricing: Implements both closed-form solutions (e.g., Black-Scholes model) and open-form, iterative methods (e.g., Binomial Tree model) for pricing derivatives;
|
|
11
|
+
* Data Treatment: Tools for cleaning, structuring, and transforming raw financial data into usable formats for analysis;
|
|
12
|
+
* Data Loading: Seamlessly integrates with databases such as PostgreSQL, MySQL, and SQLite.
|
|
13
|
+
|
|
14
|
+
## Project Structure
|
|
15
|
+
|
|
16
|
+
stpstone
|
|
17
|
+
├── airflow
|
|
18
|
+
│ └── plugins.py
|
|
19
|
+
├── cals
|
|
20
|
+
│ ├── br_bzdays.py
|
|
21
|
+
│ ├── handling_dates.py
|
|
22
|
+
│ └── usa_bzdays.py
|
|
23
|
+
├── charts
|
|
24
|
+
│ ├── general_funcs.py
|
|
25
|
+
│ ├── prob_and_stats.py
|
|
26
|
+
│ ├── risk_management.py
|
|
27
|
+
│ ├── stock_market.py
|
|
28
|
+
│ └── tsir.py
|
|
29
|
+
├── cloud_clients
|
|
30
|
+
│ └── aws_s3.py
|
|
31
|
+
├── document_numbers
|
|
32
|
+
│ └── br.py
|
|
33
|
+
├── dsa
|
|
34
|
+
│ └── trees
|
|
35
|
+
│ └── b_tree.py
|
|
36
|
+
├── equity_consolidation
|
|
37
|
+
│ └── banks.py
|
|
38
|
+
├── finance
|
|
39
|
+
│ ├── anbima
|
|
40
|
+
│ │ ├── abimadata_api.py
|
|
41
|
+
│ │ ├── anbima_mtm.py
|
|
42
|
+
│ │ ├── anbima_stats.py
|
|
43
|
+
│ │ └── anbimadev.py
|
|
44
|
+
│ ├── auditing
|
|
45
|
+
│ │ └── earnings_manipulation.py
|
|
46
|
+
│ ├── b3
|
|
47
|
+
│ │ ├── cei.py
|
|
48
|
+
│ │ ├── core.py
|
|
49
|
+
│ │ ├── inoa.py
|
|
50
|
+
│ │ ├── line.py
|
|
51
|
+
│ │ ├── margin_simulator.py
|
|
52
|
+
│ │ ├── market_data.py
|
|
53
|
+
│ │ ├── search_by_trading.py
|
|
54
|
+
│ │ └── up2data_web.py
|
|
55
|
+
│ ├── comdinheiro
|
|
56
|
+
│ │ └── api_request.py
|
|
57
|
+
│ ├── cvm
|
|
58
|
+
│ │ ├── cvm_data.py
|
|
59
|
+
│ │ └── cvm_web.py
|
|
60
|
+
│ ├── dadosdemercado_site
|
|
61
|
+
│ │ └── api_request.py
|
|
62
|
+
│ ├── debentures
|
|
63
|
+
│ │ └── pricing.py
|
|
64
|
+
│ ├── derivatives
|
|
65
|
+
│ │ ├── forward.py
|
|
66
|
+
│ │ ├── futures.py
|
|
67
|
+
│ │ └── options
|
|
68
|
+
│ │ ├── american.py
|
|
69
|
+
│ │ └── european.py
|
|
70
|
+
│ ├── financial_risk
|
|
71
|
+
│ │ ├── capital_risk.py
|
|
72
|
+
│ │ ├── liquidity_risk.py
|
|
73
|
+
│ │ ├── market_risk.py
|
|
74
|
+
│ │ └── yield_risk.py
|
|
75
|
+
│ ├── macroeconomics
|
|
76
|
+
│ │ ├── br_macro.py
|
|
77
|
+
│ │ ├── global_rates.py
|
|
78
|
+
│ │ ├── usa_macro.py
|
|
79
|
+
│ │ └── world_gov_bonds.py
|
|
80
|
+
│ ├── performance_apprraisal
|
|
81
|
+
│ │ ├── company_return.py
|
|
82
|
+
│ │ └── financial_math.py
|
|
83
|
+
│ ├── reuters
|
|
84
|
+
│ │ └── api_request.py
|
|
85
|
+
│ ├── spot
|
|
86
|
+
│ │ └── stocks.py
|
|
87
|
+
│ └── tesouro_direto
|
|
88
|
+
│ ├── calculadora.py
|
|
89
|
+
│ └── consulta_dados.py
|
|
90
|
+
├── geography
|
|
91
|
+
│ └── br.py
|
|
92
|
+
├── handling_data
|
|
93
|
+
│ ├── dicts.py
|
|
94
|
+
│ ├── folders.py
|
|
95
|
+
│ ├── html.py
|
|
96
|
+
│ ├── img.py
|
|
97
|
+
│ ├── json.py
|
|
98
|
+
│ ├── lists.py
|
|
99
|
+
│ ├── lxml.py
|
|
100
|
+
│ ├── numbers.py
|
|
101
|
+
│ ├── object.py
|
|
102
|
+
│ ├── pd.py
|
|
103
|
+
│ ├── pdf.py
|
|
104
|
+
│ ├── pickle.py
|
|
105
|
+
│ ├── str.py
|
|
106
|
+
│ ├── tgz.py
|
|
107
|
+
│ ├── txt.py
|
|
108
|
+
│ └── xml.py
|
|
109
|
+
├── llms
|
|
110
|
+
│ └── gpt.py
|
|
111
|
+
├── loggs
|
|
112
|
+
│ ├── create_logs.py
|
|
113
|
+
│ └── db_logs.py
|
|
114
|
+
├── meta
|
|
115
|
+
│ └── validate_pm.py
|
|
116
|
+
├── microsoft_apps
|
|
117
|
+
│ ├── cmd.py
|
|
118
|
+
│ ├── excel.py
|
|
119
|
+
│ ├── onedrive.py
|
|
120
|
+
│ ├── outlook.py
|
|
121
|
+
│ └── windows_os.py
|
|
122
|
+
├── multithreading
|
|
123
|
+
│ └── mp_helper.py
|
|
124
|
+
├── opening_config
|
|
125
|
+
│ └── setup.py
|
|
126
|
+
├── pool_conn
|
|
127
|
+
│ ├── dabricksCLI.py
|
|
128
|
+
│ ├── databricks.py
|
|
129
|
+
│ ├── generic.py
|
|
130
|
+
│ ├── mongodb.py
|
|
131
|
+
│ ├── mysql.py
|
|
132
|
+
│ ├── postgresql.py
|
|
133
|
+
│ ├── redis.py
|
|
134
|
+
│ ├── session.py
|
|
135
|
+
│ ├── sqlite.py
|
|
136
|
+
│ └── sqlserver.py
|
|
137
|
+
├── quantitative_methods
|
|
138
|
+
│ ├── calculus.py
|
|
139
|
+
│ ├── classification.py
|
|
140
|
+
│ ├── data_cleaning.py
|
|
141
|
+
│ ├── eda.py
|
|
142
|
+
│ ├── features_selecting.py
|
|
143
|
+
│ ├── fit_assessment.py
|
|
144
|
+
│ ├── interpolation.py
|
|
145
|
+
│ ├── linear_algebra.py
|
|
146
|
+
│ ├── prob_distributions.py
|
|
147
|
+
│ ├── regression.py
|
|
148
|
+
│ ├── root.py
|
|
149
|
+
│ ├── sequences.py
|
|
150
|
+
│ ├── statistical_description.py
|
|
151
|
+
│ └── statistical_inference.py
|
|
152
|
+
├── sendgrid
|
|
153
|
+
│ └── handling_sendgrid.py
|
|
154
|
+
├── settings
|
|
155
|
+
│ ├── _global_slots.py
|
|
156
|
+
│ ├── anbima.yaml
|
|
157
|
+
│ ├── b3.yaml
|
|
158
|
+
│ ├── br_macro.yaml
|
|
159
|
+
│ ├── br_treasury.yaml
|
|
160
|
+
│ ├── comdinheiro.yaml
|
|
161
|
+
│ ├── generic.yaml
|
|
162
|
+
│ ├── global_rates.yaml
|
|
163
|
+
│ ├── inoa.yaml
|
|
164
|
+
│ ├── llms.yaml
|
|
165
|
+
│ ├── microsoft_apps.yaml
|
|
166
|
+
│ ├── session.yaml
|
|
167
|
+
│ ├── usa_macro.yaml
|
|
168
|
+
│ └── world_gov_bonds.yaml
|
|
169
|
+
├── trading_platforms
|
|
170
|
+
│ └── mt5.py
|
|
171
|
+
├── typeform_sdk_master
|
|
172
|
+
│ ├── CHANGELOG.md
|
|
173
|
+
│ ├── CONTRIBUTING.md
|
|
174
|
+
│ ├── LICENSE
|
|
175
|
+
│ ├── MANIFEST.in
|
|
176
|
+
│ ├── README.md
|
|
177
|
+
│ ├── requirements-dev.txt
|
|
178
|
+
│ ├── setup.cfg
|
|
179
|
+
│ ├── setup.py
|
|
180
|
+
│ └── typeform
|
|
181
|
+
│ ├── __init__.py
|
|
182
|
+
│ ├── client.py
|
|
183
|
+
│ ├── constants.py
|
|
184
|
+
│ ├── dealing_tf.py
|
|
185
|
+
│ ├── forms.py
|
|
186
|
+
│ ├── responses.py
|
|
187
|
+
│ ├── test
|
|
188
|
+
│ │ ├── __init__.py
|
|
189
|
+
│ │ ├── fixtures.py
|
|
190
|
+
│ │ ├── suite.py
|
|
191
|
+
│ │ ├── test_client.py
|
|
192
|
+
│ │ ├── test_forms.py
|
|
193
|
+
│ │ └── test_responses.py
|
|
194
|
+
│ └── utils.py
|
|
195
|
+
└── webhooks
|
|
196
|
+
├── slack.py
|
|
197
|
+
└── teams.py
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
## Getting Started
|
|
203
|
+
|
|
204
|
+
These instructions will get you a copy of the project running on your local machine for development and testing purposes.
|
|
205
|
+
|
|
206
|
+
### Prerequisites
|
|
207
|
+
|
|
208
|
+
* Python ^3.9.13
|
|
209
|
+
|
|
210
|
+
### Installing
|
|
211
|
+
|
|
212
|
+
* Pyenv for Python ^3.9.13 local installation:
|
|
213
|
+
|
|
214
|
+
```powershell
|
|
215
|
+
(PowerShell)
|
|
216
|
+
|
|
217
|
+
Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
(bash)
|
|
222
|
+
|
|
223
|
+
echo installing local version of python within project
|
|
224
|
+
cd "complete/path/to/project"
|
|
225
|
+
pyenv install 3.9.13
|
|
226
|
+
pyenv versions
|
|
227
|
+
pyenv global 3.9.13
|
|
228
|
+
pyenv local 3.9.13
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
* Activate poetry .venv
|
|
232
|
+
```bash
|
|
233
|
+
(bash)
|
|
234
|
+
|
|
235
|
+
echo defining local pyenv version
|
|
236
|
+
pyenv local 3.9.13
|
|
237
|
+
pyenv which python
|
|
238
|
+
poetry env use "COMPLETE_PATH_PY_3.9.13"
|
|
239
|
+
echo check python version running locally
|
|
240
|
+
poetry run py --version
|
|
241
|
+
|
|
242
|
+
echo installing poetry .venv
|
|
243
|
+
poetry init
|
|
244
|
+
poery install --no-root
|
|
245
|
+
|
|
246
|
+
echo running current .venv
|
|
247
|
+
poetry shell
|
|
248
|
+
poetry add <package name, optionally version>
|
|
249
|
+
poetry run <module.py>
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Running the Tests
|
|
253
|
+
|
|
254
|
+
* EDA - Exploratory Data Analysis:
|
|
255
|
+
```(bash)
|
|
256
|
+
|
|
257
|
+
(bash)
|
|
258
|
+
|
|
259
|
+
cd "complete/path/to/project"
|
|
260
|
+
poetry run python stpstone.tests.eda.py
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
* European / American Options:
|
|
265
|
+
```(bash)
|
|
266
|
+
|
|
267
|
+
(bash)
|
|
268
|
+
|
|
269
|
+
cd "complete/path/to/project"
|
|
270
|
+
poetry run python tests.european-american-options.py
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
* Markowitz Portfolios:
|
|
275
|
+
```(bash)
|
|
276
|
+
|
|
277
|
+
(bash)
|
|
278
|
+
|
|
279
|
+
cd "complete/path/to/project"
|
|
280
|
+
poetry run python tests.markowitz-portfolios.py
|
|
281
|
+
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
## Authors
|
|
286
|
+
|
|
287
|
+
**Guilherme Rodrigues**
|
|
288
|
+
* [GitHub](https://github.com/guilhermegor)
|
|
289
|
+
* [LinkedIn](https://www.linkedin.com/in/guilhermegor/)
|
|
290
|
+
|
|
291
|
+
## License
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
## Acknowledgments
|
|
295
|
+
|
|
296
|
+
* Hat tip to anyone whose code was used
|
|
297
|
+
* Inspiration
|
|
298
|
+
* etc
|
|
299
|
+
|
|
300
|
+
## Inspirations
|
|
301
|
+
|
|
302
|
+
* [Gist](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2)
|