Feature/improve fire section (#813)
* Improve FIRE section * Update changelog
This commit is contained in:
parent
bfc8f87d88
commit
3d3a6c1204
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Improved the 4% rule in the _FIRE_ section
|
||||||
|
|
||||||
## 1.133.0 - 07.04.2022
|
## 1.133.0 - 07.04.2022
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -14,12 +14,11 @@ import { takeUntil } from 'rxjs/operators';
|
|||||||
templateUrl: './fire-page.html'
|
templateUrl: './fire-page.html'
|
||||||
})
|
})
|
||||||
export class FirePageComponent implements OnDestroy, OnInit {
|
export class FirePageComponent implements OnDestroy, OnInit {
|
||||||
public fireWealth: number;
|
public fireWealth: Big;
|
||||||
public hasImpersonationId: boolean;
|
|
||||||
public isLoading = false;
|
public isLoading = false;
|
||||||
public user: User;
|
public user: User;
|
||||||
public withdrawalRatePerMonth: number;
|
public withdrawalRatePerMonth: Big;
|
||||||
public withdrawalRatePerYear: number;
|
public withdrawalRatePerYear: Big;
|
||||||
|
|
||||||
private unsubscribeSubject = new Subject<void>();
|
private unsubscribeSubject = new Subject<void>();
|
||||||
|
|
||||||
@ -39,13 +38,6 @@ export class FirePageComponent implements OnDestroy, OnInit {
|
|||||||
public ngOnInit() {
|
public ngOnInit() {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
|
|
||||||
this.impersonationStorageService
|
|
||||||
.onChangeHasImpersonation()
|
|
||||||
.pipe(takeUntil(this.unsubscribeSubject))
|
|
||||||
.subscribe((aId) => {
|
|
||||||
this.hasImpersonationId = !!aId;
|
|
||||||
});
|
|
||||||
|
|
||||||
this.dataService
|
this.dataService
|
||||||
.fetchPortfolioSummary()
|
.fetchPortfolioSummary()
|
||||||
.pipe(takeUntil(this.unsubscribeSubject))
|
.pipe(takeUntil(this.unsubscribeSubject))
|
||||||
@ -54,14 +46,9 @@ export class FirePageComponent implements OnDestroy, OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.fireWealth = new Big(currentValue).plus(cash).toNumber();
|
this.fireWealth = new Big(currentValue);
|
||||||
this.withdrawalRatePerYear = new Big(this.fireWealth)
|
this.withdrawalRatePerYear = this.fireWealth.mul(4).div(100);
|
||||||
.mul(4)
|
this.withdrawalRatePerMonth = this.withdrawalRatePerYear.div(12);
|
||||||
.div(100)
|
|
||||||
.toNumber();
|
|
||||||
this.withdrawalRatePerMonth = new Big(this.withdrawalRatePerYear)
|
|
||||||
.div(12)
|
|
||||||
.toNumber();
|
|
||||||
|
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
><gf-value
|
><gf-value
|
||||||
class="d-inline-block"
|
class="d-inline-block"
|
||||||
[currency]="user?.settings?.baseCurrency"
|
[currency]="user?.settings?.baseCurrency"
|
||||||
[value]="withdrawalRatePerYear"
|
[locale]="user?.settings?.locale"
|
||||||
|
[value]="withdrawalRatePerYear?.toNumber()"
|
||||||
></gf-value>
|
></gf-value>
|
||||||
per year</span
|
per year</span
|
||||||
>
|
>
|
||||||
@ -36,16 +37,18 @@
|
|||||||
><gf-value
|
><gf-value
|
||||||
class="d-inline-block"
|
class="d-inline-block"
|
||||||
[currency]="user?.settings?.baseCurrency"
|
[currency]="user?.settings?.baseCurrency"
|
||||||
[value]="withdrawalRatePerMonth"
|
[locale]="user?.settings?.locale"
|
||||||
|
[value]="withdrawalRatePerMonth?.toNumber()"
|
||||||
></gf-value>
|
></gf-value>
|
||||||
per month</span
|
per month</span
|
||||||
>, based on your net worth of
|
>, based on your investment of
|
||||||
<gf-value
|
<gf-value
|
||||||
class="d-inline-block"
|
class="d-inline-block"
|
||||||
[currency]="user?.settings?.baseCurrency"
|
[currency]="user?.settings?.baseCurrency"
|
||||||
[value]="fireWealth"
|
[locale]="user?.settings?.locale"
|
||||||
|
[value]="fireWealth?.toNumber()"
|
||||||
></gf-value>
|
></gf-value>
|
||||||
(excluding emergency fund) and a withdrawal rate of 4%.
|
and a withdrawal rate of 4%.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user