Skip to content

Commit

Permalink
v1.3.1 Hotfix Release
Browse files Browse the repository at this point in the history
  • Loading branch information
JerBouma committed Aug 29, 2023
1 parent 120879a commit 540bc17
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The Finance Toolkit is complimented very well with the [Finance Database 🌎](h

Before installation, consider starring the project on GitHub which helps others find the project as well.

<a href="https://github.com/JerBouma/FinanceToolkit" target="_blank"><img width="1415" alt="image" src="https://github.com/JerBouma/FinanceToolkit/assets/46355364/014109fe-0c68-47d4-99bd-217c69dcea8d">
<a href="https://github.com/JerBouma/FinanceToolkit" target="_blank"><img width="1415" alt="image" src="https://github.com/JerBouma/FinanceToolkit/assets/46355364/014109fe-0c68-47d4-99bd-217c69dcea8d"></a>

To install the FinanceToolkit it simply requires the following:

Expand Down
10 changes: 8 additions & 2 deletions financetoolkit/base/toolkit_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,11 @@ def technicals(self) -> Technicals:
"""
if not self._start_date:
self._start_date = (datetime.today() - timedelta(days=365)).strftime(
self._start_date = (datetime.today() - timedelta(days=365 * 10)).strftime(
"%Y-%m-%d"
)
if not self._end_date:
self._start_date = datetime.today().strftime("%Y-%m-%d")
self._end_date = datetime.today().strftime("%Y-%m-%d")

if self._historical.empty:
if self._daily_historical_data.empty:
Expand Down Expand Up @@ -1129,6 +1129,12 @@ def get_historical_data(
self._quarterly_risk_free_rate = pd.Series(0)
self._yearly_historical_data = pd.Series(0)
else:
daily_risk_free_rate = daily_risk_free_rate.loc[
self._start_date : self._end_date, : # type: ignore
].copy()

daily_risk_free_rate.loc[daily_risk_free_rate.index[0], "Return"] = 0

# Division by 100 given that TNX is also a percentage (e.g 4.5% == 0.045)
daily_risk_free_rate = (
daily_risk_free_rate.xs("^TNX", level=1, axis=1) / 100
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "financetoolkit"
version = "1.3.0"
version = "1.3.1"
description = "Transparent and Efficient Financial Analysis"
license = "MIT"
authors = ["Jeroen Bouma"]
Expand Down

0 comments on commit 540bc17

Please sign in to comment.