Skip to content

litecoin-foundation/litecoin_forecasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Litecoin Growth Simulation

This repository contains a Python library for simulating user growth and daily transactions in a system, influenced by various factors including logistic growth models and external factors like BTC hashrate. The library also includes Monte Carlo simulations to account for uncertainty and confidence intervals.


Table of Contents

  1. Directory Structure
  2. Features
  3. Installation
  4. Usage
  5. Simulate User Growth and Transactions
  6. Monte Carlo Simulation
  7. Parameters
  8. Contributors/Maintainers
  9. Contributing
  10. License

Directory Structure

/project_root
|-- /assets
|   |-- growth_and_transactions.png
|   |-- growth_and_transactions.png
|   |-- growth_and_transactions_CI.png
|   |-- growth_and_transactions_CI_hashrate.png
|
|-- /white_paper
|   |-- Modeling Litecoin User Growth...Shpaner,Leonid.pdf
|
|-- LICENSE.MD
|-- README.md
|-- main.py
|-- requirements.txt

Features

  • Simulate User Growth and Transactions: Model user growth over time and calculate daily transactions.
  • Simulate Growth with BTC Hashrate Influence: Integrate external factors like BTC hashrate to simulate growth more realistically.
  • Monte Carlo Simulations: Perform multiple simulations to generate confidence intervals and understand the variability in predictions.
  • Customizable Plots: Generate and save plots for analysis, with support for various customization options.

Installation

Clone the repository

git clone https://github.com/litecoin-foundation/litecoin_analytics.git
pip install -r requirements.txt

Usage

For now, you can rely on the main.py script to access and utilize the key functions of the project. The script includes all the essential functionalities that will eventually be packaged into a standalone library.

Simulate User Growth and Transactions

results = simulate_user_growth_and_transactions(
    initial_users=1000,
    carrying_capacity=100000,
    growth_rate=0.10,
    usage_rate=0.8,
    time_steps=365,
    start_date="2024-01-01",
    figsize=(12, 6),
    plot=True,
    return_results=True,
    label_fontsize=12,
    tick_fontsize=10,
    save_plot=True,
    image_path_png="user_growth.png",
    image_path_svg="user_growth.svg"
)

Simulate Growth with BTC Hashrate

results = simulate_growth_with_btc_hashrate(
    initial_users=1000,
    carrying_capacity=100000,
    base_growth_rate=0.10,
    usage_rate=0.8,
    days=365,
    figsize=(12, 6),
    plot=True,
    return_results=True,
    label_fontsize=12,
    tick_fontsize=10,
    save_plot=True,
    image_path_png="growth_btc_hashrate.png",
    image_path_svg="growth_btc_hashrate.svg"
)

Monte Carlo Simulation

results = simulate_monte_carlo_growth(
    initial_users=1000,
    carrying_capacity=100000,
    base_growth_rate=0.10,
    time_steps=365,
    num_simulations=1000,
    confidence_levels=[95, 99],
    x_axis="days",
    start_date="2024-01-01",
    plot=True,
    save_plot=True,
    image_path_png="monte_carlo_growth.png",
    image_path_svg="monte_carlo_growth.svg"
)

Monte Carlo Simulation with BTC Hashrate Influence

results = simulate_monte_carlo_growth_with_hashrate(
    initial_users=1000,
    carrying_capacity=100000,
    base_growth_rate=0.10,
    time_steps=365,
    num_simulations=1000,
    confidence_levels=[95, 99],
    x_axis="days",
    start_date="2024-01-01",
    days=365,
    plot=True,
    save_plot=True,
    image_path_png="monte_carlo_hashrate.png",
    image_path_svg="monte_carlo_hashrate.svg"
)

Parameters

All functions in the library provide flexibility through several parameters. These include:

  • initial_users: Initial number of users.
  • carrying_capacity: Maximum number of users the system can support.
  • growth_rate: Growth rate per time step.
  • usage_rate: Proportion of users who use the system daily.
  • time_steps: Number of days to simulate.
  • plot: Whether to plot the results.
  • return_results: Whether to return the results as a DataFrame.
  • save_plot: Whether to save the generated plots.

Refer to the docstrings within each function for detailed descriptions of all parameters.

Contributors/Maintainers

Leonid Shpaner is a Data Scientist at UCLA Health. With over a decade experience in analytics and teaching, he has collaborated on a wide variety of projects within financial services, education, personal development, and healthcare. He serves as a course facilitator for Data Analytics and Applied Statistics at Cornell University and is a lecturer of Statistics in Python for the University of San Diego's M.S. Applied Artificial Intelligence program.




Contributing

If you would like to contribute to this project, feel free to fork the repository and submit a pull request with your changes.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages