compoundercalc


Namecompoundercalc JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/croketillo/compoundercalc
SummaryA package for compound interest calculations
upload_time2024-06-28 18:22:50
maintainerNone
docs_urlNone
authorCroketillo
requires_python>=3.7
licenseGNU v3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Compound Interest Calculator

This package provides a `CompoundInterestCalculator` class for calculating compound interest for various financial scenarios.

## Features

- Calculate the total amount with compound interest over a period of time.
- Determine the time needed to reach a target amount with compound interest.
- Calculate the required recurring deposit to reach a target amount.
- Calculate the required interest rate to reach a target amount.

## Installation

You can install the package using pip:

```bash
pip install compoundercalc
```

## Usage

### Importing the Calculator

```python
from compoundercalc.compounder import CompoundInterestCalculator
```

### Creating an Instance

```python
calc = CompoundInterestCalculator(initial_deposit=1000, recurring_deposit=150, num_recurring_per_year=12, interest_rate=0.08)
```

### Calculating the Final Amount

```python
result = calc.final_amount(time_years=10)
print(f"The final amount is: {result:.2f}")
```

### Determining the Time to Reach a Target Amount

```python
years, months, days = calc.time_goal(target_amount=100000)
print(f"Time needed to reach the goal: {years} years, {months} months, and {days} days")
```

### Calculating the Required Recurring Deposit

```python
required_deposit = calc.calc_recurring_deposit(target_amount=100000, total_years=10)
print(f"The required recurring deposit is: {required_deposit:.2f}")
```

### Calculating the Required Interest Rate

```python
try:
    required_rate = calc.calc_interest_rate(target_amount=100000, total_years=10)
    print(f"The required annual interest rate is: {required_rate:.4f}")
except ValueError as e:
    print(e)
```

## Running Tests

To run the tests, use the following command:

```bash
python -m unittest discover -s test
```

## License

This project is licensed under GNU License. See the [LICENSE](LICENSE) file for details.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/croketillo/compoundercalc",
    "name": "compoundercalc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Croketillo",
    "author_email": "croketillo@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/51/0e/c706eb628cd73627315b9f018dd29abdeb8c2c4775c32369addb6eb5b546/compoundercalc-0.1.0.tar.gz",
    "platform": null,
    "description": "\n# Compound Interest Calculator\n\nThis package provides a `CompoundInterestCalculator` class for calculating compound interest for various financial scenarios.\n\n## Features\n\n- Calculate the total amount with compound interest over a period of time.\n- Determine the time needed to reach a target amount with compound interest.\n- Calculate the required recurring deposit to reach a target amount.\n- Calculate the required interest rate to reach a target amount.\n\n## Installation\n\nYou can install the package using pip:\n\n```bash\npip install compoundercalc\n```\n\n## Usage\n\n### Importing the Calculator\n\n```python\nfrom compoundercalc.compounder import CompoundInterestCalculator\n```\n\n### Creating an Instance\n\n```python\ncalc = CompoundInterestCalculator(initial_deposit=1000, recurring_deposit=150, num_recurring_per_year=12, interest_rate=0.08)\n```\n\n### Calculating the Final Amount\n\n```python\nresult = calc.final_amount(time_years=10)\nprint(f\"The final amount is: {result:.2f}\")\n```\n\n### Determining the Time to Reach a Target Amount\n\n```python\nyears, months, days = calc.time_goal(target_amount=100000)\nprint(f\"Time needed to reach the goal: {years} years, {months} months, and {days} days\")\n```\n\n### Calculating the Required Recurring Deposit\n\n```python\nrequired_deposit = calc.calc_recurring_deposit(target_amount=100000, total_years=10)\nprint(f\"The required recurring deposit is: {required_deposit:.2f}\")\n```\n\n### Calculating the Required Interest Rate\n\n```python\ntry:\n    required_rate = calc.calc_interest_rate(target_amount=100000, total_years=10)\n    print(f\"The required annual interest rate is: {required_rate:.4f}\")\nexcept ValueError as e:\n    print(e)\n```\n\n## Running Tests\n\nTo run the tests, use the following command:\n\n```bash\npython -m unittest discover -s test\n```\n\n## License\n\nThis project is licensed under GNU License. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n",
    "bugtrack_url": null,
    "license": "GNU v3",
    "summary": "A package for compound interest calculations",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/croketillo/compoundercalc"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "474bc1634c1235636833c6aef0f610e1f373169babbbeea6a50dcd3dd982bfb1",
                "md5": "965b9b1e1d7df69cab934925a7586d79",
                "sha256": "bc44023e7a519cc4418f27adbb495ed074f58b781e17bc2e0d282c2da399648e"
            },
            "downloads": -1,
            "filename": "compoundercalc-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "965b9b1e1d7df69cab934925a7586d79",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4223,
            "upload_time": "2024-06-28T18:22:48",
            "upload_time_iso_8601": "2024-06-28T18:22:48.936820Z",
            "url": "https://files.pythonhosted.org/packages/47/4b/c1634c1235636833c6aef0f610e1f373169babbbeea6a50dcd3dd982bfb1/compoundercalc-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "510ec706eb628cd73627315b9f018dd29abdeb8c2c4775c32369addb6eb5b546",
                "md5": "2a268ebb69e407bc77fed81b9e8cb4fe",
                "sha256": "c97feb11f50b71cb86886f4a1f1c43223e99874e48c57dc943355bef96954b88"
            },
            "downloads": -1,
            "filename": "compoundercalc-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2a268ebb69e407bc77fed81b9e8cb4fe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4217,
            "upload_time": "2024-06-28T18:22:50",
            "upload_time_iso_8601": "2024-06-28T18:22:50.831831Z",
            "url": "https://files.pythonhosted.org/packages/51/0e/c706eb628cd73627315b9f018dd29abdeb8c2c4775c32369addb6eb5b546/compoundercalc-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-28 18:22:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "croketillo",
    "github_project": "compoundercalc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "compoundercalc"
}
        
Elapsed time: 0.24062s