farms 0.1.14__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.
- farms-0.1.14/LICENSE +9 -0
- farms-0.1.14/PKG-INFO +36 -0
- farms-0.1.14/README.md +5 -0
- farms-0.1.14/pyproject.toml +42 -0
- farms-0.1.14/setup.cfg +4 -0
- farms-0.1.14/src/farms/__init__.py +44 -0
- farms-0.1.14/src/farms/pipelines/Ken_French_library.py +946 -0
- farms-0.1.14/src/farms/pipelines/alpha_vantage.py +60 -0
- farms-0.1.14/src/farms/pipelines/crsp.py +121 -0
- farms-0.1.14/src/farms/pipelines/yahoo_finance.py +46 -0
- farms-0.1.14/src/farms/tools/black_scholes.py +30 -0
- farms-0.1.14/src/farms/tools/portfolio_tools.py +171 -0
- farms-0.1.14/src/farms/tools/stats_tools.py +64 -0
- farms-0.1.14/src/farms.egg-info/PKG-INFO +36 -0
- farms-0.1.14/src/farms.egg-info/SOURCES.txt +16 -0
- farms-0.1.14/src/farms.egg-info/dependency_links.txt +1 -0
- farms-0.1.14/src/farms.egg-info/requires.txt +11 -0
- farms-0.1.14/src/farms.egg-info/top_level.txt +1 -0
farms-0.1.14/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Brian Boyer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
farms-0.1.14/PKG-INFO
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: farms
|
|
3
|
+
Version: 0.1.14
|
|
4
|
+
Summary: A Python toolkit for loading financial data and performing regression and portfolio analysis for teaching and research.
|
|
5
|
+
Author: Brian Boyer, Royston Vance
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 Brian Boyer
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
15
|
+
Project-URL: Homepage, https://github.com/rvance1/simple-finance
|
|
16
|
+
Project-URL: Issues, https://github.com/rvance1/simple-finance/issues
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: pandas<2.3,>=2.2
|
|
21
|
+
Requires-Dist: requests>=2.32.4
|
|
22
|
+
Requires-Dist: statsmodels>=0.14.5
|
|
23
|
+
Requires-Dist: yfinance>=0.2.66
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: ipykernel>=6.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
27
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
28
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
29
|
+
Requires-Dist: wrds>=0.9.0; extra == "dev"
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
# simple-finance
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
```bash
|
|
36
|
+
pip install simple-finance
|
farms-0.1.14/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "farms"
|
|
7
|
+
version = "0.1.14"
|
|
8
|
+
description = "A Python toolkit for loading financial data and performing regression and portfolio analysis for teaching and research."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = { file = "LICENSE" }
|
|
12
|
+
authors = [{ name = "Brian Boyer" }, { name = "Royston Vance" }]
|
|
13
|
+
dependencies = [
|
|
14
|
+
"pandas>=2.2,<2.3",
|
|
15
|
+
"requests>=2.32.4",
|
|
16
|
+
"statsmodels>=0.14.5",
|
|
17
|
+
"yfinance>=0.2.66",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.urls]
|
|
21
|
+
Homepage = "https://github.com/rvance1/simple-finance"
|
|
22
|
+
Issues = "https://github.com/rvance1/simple-finance/issues"
|
|
23
|
+
|
|
24
|
+
[project.optional-dependencies]
|
|
25
|
+
dev = [
|
|
26
|
+
"ipykernel>=6.0",
|
|
27
|
+
"pytest>=8.0",
|
|
28
|
+
"ruff>=0.6",
|
|
29
|
+
"mypy>=1.0",
|
|
30
|
+
"wrds>=0.9.0",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[tool.setuptools]
|
|
34
|
+
package-dir = {"" = "src"}
|
|
35
|
+
|
|
36
|
+
[tool.setuptools.packages.find]
|
|
37
|
+
where = ["src"]
|
|
38
|
+
|
|
39
|
+
[dependency-groups]
|
|
40
|
+
dev = [
|
|
41
|
+
"python-dotenv>=1.2.1",
|
|
42
|
+
]
|
farms-0.1.14/setup.cfg
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from .pipelines.alpha_vantage import format_alpha_vantage
|
|
2
|
+
from .pipelines.crsp import get_crsp_msf_by_ids
|
|
3
|
+
from .pipelines.Ken_French_library import get_ff3, get_ff5, get_ken_french_deciles
|
|
4
|
+
from .pipelines.yahoo_finance import get_monthly_returns
|
|
5
|
+
|
|
6
|
+
from .tools.black_scholes import black_scholes, implied_volatility
|
|
7
|
+
from .tools.portfolio_tools import describe, portfolio_volatility, portfolio_sharpe, EFRS_portfolio, tangent_portfolio
|
|
8
|
+
from .tools.stats_tools import intercept, slope, run_ols
|
|
9
|
+
from importlib.metadata import version
|
|
10
|
+
|
|
11
|
+
import pandas as pd
|
|
12
|
+
import warnings
|
|
13
|
+
|
|
14
|
+
warnings.filterwarnings(
|
|
15
|
+
"ignore",
|
|
16
|
+
message="pandas only supports SQLAlchemy connectable.*",
|
|
17
|
+
category=UserWarning,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
pd.set_option('display.max_rows', None) # Show all rows
|
|
21
|
+
pd.set_option('display.max_columns', None) # Show all columns
|
|
22
|
+
pd.set_option('display.width', None) # Adjust width to fit the output
|
|
23
|
+
pd.set_option('display.max_colwidth', None) # Show full column content without truncation
|
|
24
|
+
|
|
25
|
+
__version__ = version("simple-finance")
|
|
26
|
+
|
|
27
|
+
__all__ = [
|
|
28
|
+
"format_alpha_vantage",
|
|
29
|
+
"get_crsp_msf_by_ids",
|
|
30
|
+
"get_ff3",
|
|
31
|
+
"get_ff5",
|
|
32
|
+
"get_ken_french_deciles",
|
|
33
|
+
"get_monthly_returns",
|
|
34
|
+
"black_scholes",
|
|
35
|
+
"implied_volatility",
|
|
36
|
+
"describe",
|
|
37
|
+
"portfolio_volatility",
|
|
38
|
+
"portfolio_sharpe",
|
|
39
|
+
"EFRS_portfolio",
|
|
40
|
+
"tangent_portfolio",
|
|
41
|
+
"intercept",
|
|
42
|
+
"slope",
|
|
43
|
+
"run_ols"
|
|
44
|
+
]
|