Skip to content

Commit

Permalink
docs extended
Browse files Browse the repository at this point in the history
  • Loading branch information
97gamjak committed Feb 26, 2024
1 parent 80f59f5 commit 225ca72
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 15 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -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.
84 changes: 84 additions & 0 deletions docs/source/financialStatments/balanceSheet.rst
Original file line number Diff line number Diff line change
@@ -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}}
11 changes: 6 additions & 5 deletions docs/source/financialStatments/financialStatments.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
.. _financialStatements:

####################
Financial Statements
####################

.. toctree::
:hidden:
:maxdepth: -1
:maxdepth: 2

incomeStatement.rst
balanceSheet.rst



general.rst

.. include:: incomeStatement.rst
27 changes: 21 additions & 6 deletions docs/source/financialStatments/incomeStatement.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
.. _incomeStatement:

****************
Income Statement
****************

Expand All @@ -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}
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ StockMarket
:maxdepth: -1

financialStatments/financialStatments.rst
code/stockMarker.rst
code/stockMarket.rst

:ref:`financialStatements`
4 changes: 2 additions & 2 deletions stockMarket/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
2 changes: 1 addition & 1 deletion stockMarket/core/financialStatement/balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 225ca72

Please sign in to comment.