Cashflower

Latest version: v0.7.1

Safety actively analyzes 629908 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 6

37.78.89.9

python

from cashflower import CSVReader

reader = CSVReader("data.csv")
value = float(reader.get_value("2", "C"))

24.45.56.6

11.12.23.3

6.6

0.7.1

- Refactored codebase for improved readability and maintainability
- Added support for handling graphs with strongly connected components (SCCs)

0.7.0

In this release, we have introduced a new feature: stochastic variables.

To run the model stochastically, set the `NUM_STOCHASTIC_SCENARIOS` with the desired number of stochastic scenarios.

python
settings = {
...
"NUM_STOCHASTIC_SCENARIOS": 10,
}


Next define create stochastic variables. These variables that have two parameters: `t` and `stoch`.

python
variable()
def discount_rate(t, stoch):
return assumption["discount_rates"+stoch][t]


variable()
def pv_premiums(t, stoch):
if t == settings["T_MAX_CALCULATION"]:
return premium(t)
else:
return premium(t) + pv_premiums(t+1, stoch) * discount_rate(t+1, stoch)


These stochastic variables will be calculated 10 times, where `stoch` value ranging from `1` to `10`.
The output will show the average result from these scenarios.

Page 1 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.