Commit Graph

12 Commits

Author SHA1 Message Date
Jeonghyun Min
4fe5104bfb feat: create straight_line_depreciation 2024-11-15 14:54:10 +08:00
Christian Clauss
e9e7c96465
Create GitHub Pages docs with Sphinx (#11888) 2024-10-08 19:09:28 +02:00
pre-commit-ci[bot]
bc8df6de31
[pre-commit.ci] pre-commit autoupdate (#11322)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-13 07:52:41 +01:00
Berat Osman Demiralay
d051db1f14
Add Simple Moving Average (SMA) Calculation (#9300)
* Add Simple Moving Average (SMA) Calculation

This commit adds a Python script for calculating the Simple Moving Average (SMA) of a time series data.

The script also includes a doctest that verifies the correctness of the SMA calculations for a sample dataset.

Usage:
- Run the script with your own time series data and specify the window size for SMA calculations.

* Update financial/simple_moving_average.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update financial/simple_moving_average.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update financial/simple_moving_average.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update simple_moving_average.py

* Update financial/simple_moving_average.py

* Update simple_moving_average.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-23 09:25:07 -04:00
Poojan Smart
7ea812996c
Adds exponential moving average algorithm (#10273)
* Adds exponential moving average algorithm

* code clean up

* spell correction

* Modifies I/O types of function

* Replaces generator function

* Resolved mypy type error

* readibility of code and documentation

* Update exponential_moving_average.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-12 15:54:07 +02:00
Turro
ea6c6056cf
Added apr_interest function to financial (#6025)
* Added apr_interest function to financial

* Update interest.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update financial/interest.py

* float

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-19 13:46:29 +02:00
Christian Clauss
f6df26bf0f
Fix docstring in present_value.py (#8702)
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-05-01 06:29:42 +05:30
Sahil Goel
c4dcc44dd4
Added an algorithm to calculate the present value of cash flows (#8700)
* Added an algorithm to calculate the present value of cash flows

* added doctest and reference

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Resolving deprecation issues with typing module

* Fixing argument type checks and adding doctest case

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixing failing doctest case by requiring less precision due to floating point inprecision

* Updating return type

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added test cases for more coverage

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Make improvements based on Rohan's suggestions

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update financial/present_value.py

Committed first suggestion

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update financial/present_value.py

Committed second suggestion

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update financial/present_value.py

Committed third suggestion

Co-authored-by: Christian Clauss <cclauss@me.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-04-30 19:33:22 +02:00
Sushant Srivastav
d33f9b31fe
Calculate GST Amount (#7694)
* Calculate GST Amount

The program helps to get the net amount after GST is added to it.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update financial/calculating GST.py

Thanks!

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update and rename calculating GST.py to price_plus_tax.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update price_plus_tax.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-10-26 23:15:02 +02:00
Rohan R Bharadwaj
db5aa1d188
Add equated_monthly_installments.py in Financials (#5775)
* Add equated_monthly_installments.py in Financials

* Formatting

* More formatting, Descriptive names

* Errors with name change

* Formatting

* Formatting, Naming Error

* dedent

* Update DIRECTORY.md
2021-11-07 15:40:23 +01:00
Christian Clauss
cb4dc19723
Financial: principle -> principal (#5614)
* Financial: principle -> principal

The originally invested amount of money: `principal`
-- https://www.grammarly.com/blog/principle-principal/

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-10-27 00:41:32 +08:00
Tarcisio Bruni Rangel
c41bb49fc0
Financials (#5585)
* feat: creates math calculations for financials

* refactor: make pull request items requirements

* refactor: provides type hint for parameters

* refactor: applies code review suggestions

* refactor: adds more examples tests

* refactor: throws ValueError instead of Exception

* refactor: fix formatting

* refactor: fix formatting

* Update interest.py

* Update and rename financials/ABOUT.md to financial/ABOUT.md

* Rename financials/__init__.py to financial/__init__.py

* Rename financials/interest.py to financial/interest.py

* https://www.investopedia.com

* Update __init__.py

* pre-commit: Disable end-of-file-fixer

* Revert change to pre-commit

* Update __init__.py

* __init__.py

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
2021-10-26 18:19:00 +02:00