From 225ca72bb38d1bc22702c1b4a91e68fd14824ff4 Mon Sep 17 00:00:00 2001 From: 97gamjak <97gamjak@gmail.com> Date: Mon, 26 Feb 2024 08:44:23 +0100 Subject: [PATCH] docs extended --- .github/workflows/docs.yml | 53 ++++++++++++ .../financialStatments/balanceSheet.rst | 84 +++++++++++++++++++ .../financialStatments/financialStatments.rst | 11 +-- .../financialStatments/incomeStatement.rst | 27 ++++-- docs/source/index.rst | 2 +- stockMarket/_version.py | 4 +- .../core/financialStatement/balance.py | 2 +- 7 files changed, 168 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 docs/source/financialStatments/balanceSheet.rst diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..e62e888b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,53 @@ +# Sample workflow for building and deploying a Jekyll site to GitHub Pages +name: Docs + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + branches: ["dev"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: write + pages: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Requirements + run: sudo apt-get install -y python3-sphinx + && pip3 install sphinx-rtd-theme + && pip3 install breathe + && pip3 install sphinx-sitemap + && pip3 install myst-parser + + - name: Build + run: | + cd docs + make clean + rm source/code/* + make html + cd build/html + touch .nojekyll + + # Deployment job + - name: deploy + uses: JamesIves/github-pages-deploy-action@releases/v4 + with: + branch: gh-pages # The branch the action should deploy to. + folder: docs/build/html # The folder the action should deploy. diff --git a/docs/source/financialStatments/balanceSheet.rst b/docs/source/financialStatments/balanceSheet.rst new file mode 100644 index 00000000..87e5f4c9 --- /dev/null +++ b/docs/source/financialStatments/balanceSheet.rst @@ -0,0 +1,84 @@ +Balance Sheet +************* + +Basic KPIs +========== + +* Common Stock Equity +* Total Debt +* Total Liabilities +* Total Assets +* Total Outstanding Shares Common Stock +* Book Value Per Share +* Goodwill +* Current Portion of Long Term Debt and Capital Lease Obligations +* Short Term Debt +* Accrued Expenses +* Total Long Term Debt +* Total Receivables Net +* Total Inventory +* Other Current Assets +* Prepaid Expenses +* Cash +* Cash Equivalents +* Short Term Investments + +Derived KPIs +============ + +.. admonition:: + Equity + + .. math:: + \text{Equity Shareholders} = \text{Total Assets} - \text{Total Liabilities} + +.. admonition:: + Equity Ratio + + .. math:: + \text{Equity Ratio} = \frac{\text{Equity}}{\text{Total Assets}} + +.. admonition:: + Goodwill Ratio + + .. math:: + \text{Goodwill Ratio} = \frac{\text{Goodwill}}{\text{Total Assets}} + +.. admonition:: + Total Short Term Debt + + .. math:: + \text{Total Short Term Debt} = \text{Short Term Debt} + \text{Current Portion of Long Term Debt and Capital Lease Obligations} + +.. admonition:: + Cash & Short Term Investments + + .. math:: + \text{Cash & Short Term Investments} = \text{Cash} + \text{Cash Equivalents} + \text{Short Term Investments} + +.. admonition:: + Gearing + + .. math:: + \text{Gearing} = \frac{\text{Total Shert Term Debt} + \text{Total Long Term Debt} - \text{Cash & Short Term Investments}{\text{Total Assets}} + +.. admonition:: + Total Non Current Assets + + .. math:: + \text{Total Non Current Assets} = \text{Total Assets} - \text{Total Current Assets} + +.. admonition:: + Asset Coverage Ratio\* + + .. math:: + \text{Asset Coverage Ratio} = \frec{\text{Equity} + \text{Total Long Term Debt}}{\text{Total Non Current Assets}} + +.. admonition:: + third order liquidity + + .. math:: + \text{third order liquidity} = \frac{\text{Total Current Assets}}{\text{Total Short Term Debt}} + + + diff --git a/docs/source/financialStatments/financialStatments.rst b/docs/source/financialStatments/financialStatments.rst index da0a0ac7..3c355069 100644 --- a/docs/source/financialStatments/financialStatments.rst +++ b/docs/source/financialStatments/financialStatments.rst @@ -1,13 +1,14 @@ .. _financialStatements: -#################### Financial Statements #################### .. toctree:: - :hidden: - :maxdepth: -1 + :maxdepth: 2 + + incomeStatement.rst + balanceSheet.rst + + - general.rst -.. include:: incomeStatement.rst \ No newline at end of file diff --git a/docs/source/financialStatments/incomeStatement.rst b/docs/source/financialStatments/incomeStatement.rst index de1f3212..9f25a2e5 100644 --- a/docs/source/financialStatments/incomeStatement.rst +++ b/docs/source/financialStatments/incomeStatement.rst @@ -1,6 +1,3 @@ -.. _incomeStatement: - -**************** Income Statement **************** @@ -17,13 +14,31 @@ Basic KPIs * Non-Interest Income (Financial Services) * Interest Income (Financial Services) -============ Derived KPIs ============ .. admonition:: - Revenue (Financial Services) + Revenue (Financial Services) + + .. math:: + \textrm{Revenue} = \textrm{Non-Interest Income} + \textrm{Interest Income} + +.. admonition:: + EBIT (Excluding Financial Services) .. math:: + \textrm{EBIT} = \textrm{Revenue} - \textrm{Total Operating Expenses} + +.. admonition:: + EBIT Margin (Excluding Financial Services) + + .. math:: + \textrm{EBIT Margin} = \frac{\textrm{EBIT}}{\textrm{Revenue}} + +.. admonition:: + Netto Margin + + .. math:: + \textrm{Netto Margin} = \frac{\textrm{Net Income}}{\textrm{Revenue}} + - \textrm{Revenue} = \textrm{Non-Interest Income} + \textrm{Interest Income} \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index 34cf1088..8e2fce61 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -12,6 +12,6 @@ StockMarket :maxdepth: -1 financialStatments/financialStatments.rst - code/stockMarker.rst + code/stockMarket.rst :ref:`financialStatements` \ No newline at end of file diff --git a/stockMarket/_version.py b/stockMarket/_version.py index 1e28d28a..d33cddb4 100644 --- a/stockMarket/_version.py +++ b/stockMarket/_version.py @@ -12,5 +12,5 @@ __version_tuple__: VERSION_TUPLE version_tuple: VERSION_TUPLE -__version__ = version = '0.1.dev7+g05b9e2a.d20240121' -__version_tuple__ = version_tuple = (0, 1, 'dev7', 'g05b9e2a.d20240121') +__version__ = version = '0.1.dev39+g80f59f5.d20240226' +__version_tuple__ = version_tuple = (0, 1, 'dev39', 'g80f59f5.d20240226') diff --git a/stockMarket/core/financialStatement/balance.py b/stockMarket/core/financialStatement/balance.py index 0bb7dcb1..d657051d 100644 --- a/stockMarket/core/financialStatement/balance.py +++ b/stockMarket/core/financialStatement/balance.py @@ -49,7 +49,7 @@ def goodwill_ratio(self): @property def total_short_term_debt(self): - return self.short_term_debt + self.current_portion_of_long_term_debt_and_capital_lease_obligations + self.accrued_expenses + return self.short_term_debt + self.current_portion_of_long_term_debt_and_capital_lease_obligations @property def total_current_assets(self):