The financial_analyzer
package has the goal of helping users solve various finance based problems related to accounting and business operations. The current iteration of the package can be used to understand a business's Cost and Revenue relationships, as well as the Return on Investment. The package implements and easy to use, plug and play parameter ingestion to produce financial results and indicators to help business owners, investors, or members of the financial community.
Financial_Analyzer is still in the development stage and not installable through PyPi. At this moment please follow the developer setup instructions to install and make use of the package.
$ pip install financial_analyzer
$ git clone git@github.com:UBC-MDS/financial_analyzer.git
Move to this directory in your terminal.
Create environment for the package:
conda create -n financial_analyzer python=3.9 -y
or
conda create --name financial_analyzer python=3.9 -y
Then active this newly created environment:
ca financial_analyzer
cd dist/
pip install financial_analyzer-0.1.0-py3-none-any.whl
tar xzf financial_analyzer-0.1.0.tar.gz
pip install financial_analyzer-0.1.0/
To test the functions of financial_analyzer
, open terminal at the directory of financial_analyzer
package, run below test Commands:
pip install pytest
pytest tests
roi()
: Calculate the return on investment using the initial and current value of investment.units_for_target_profit()
: Calculate the number of sold units needed to reach desired profit.breakeven_point()
: Calculate the break-even point in units (price needed), given a set of cost and revenue parameters.plot_breakeven_point()
: Visulize fixed cost, variable cost, and revenue through plotting linear equations.
financial_analyzer
can be used to calculate and plot an investment's roi and breakeven point as follows:
from financial_analyzer.roi import roi
from financial_analyzer.units_for_target_profit import units_for_target_profit
from financial_analyzer.breakeven_point import breakeven_point
from financial_analyzer.plot_breakeven_point import plot_breakeven_point
import plotly.express as px
initial_investment = 400
current_value = 450
fixed_cost = 1000
sales_price_per_unit = 8
variable_cost_per_unit = 2
roi = roi(initial_investment, current_value)
units_tg_profit = units_for_target_profit(fixed_cost, sales_price_per_unit, variable_cost_per_unit, 200)
break_even = breakeven_point(fixed_cost, sales_price_per_unit, variable_cost_per_unit)
fig = plot_breakeven_point(fixed_cost, sales_price_per_unit, variable_cost_per_unit, 500)
financial_analyzer
possess its focus on answering the commonly needed metrics in finance. The purpose of the package is to allow easy way to access these metrics, and reuse across different files. The financial_analyzer
is fairly unique in it's application as it does not make use of any other finance based packages to calculate it's metrics and results - however, the package will make use of several statistical and mathematical packages such as NumPy
, Pandas
, and Matplotlib
to produce results for its custom functions. Our package contains a wide array of finance based functions and tools, a similar package is ROICalculator
- at the current version our package is a lot simpler and we hope to work along side their team in the future!
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
The following package was created by the following contributors: Alan Powichrowski, Chris Gao, Nicole T., Rafe Chang.
financial_analyzer
was created by Nicole Tu, Rafe Chang, Alan Powichrowski, Chris Gao. It is licensed under the terms of the MIT license.
financial_analyzer
was created with cookiecutter
and the py-pkgs-cookiecutter
template.