File: //var/www/quadcode.com/src/type/investmentCalculator.ts
import { writable } from 'svelte/store';
export interface IInvestmentCalculator {
mode: string;
initialInvestment: number;
timeHorizon: number;
monthlyContribution: number;
returnRate: number;
annualInflationRate: number;
taxRate: number;
investmentFees: number;
annualContributionIncrease: number;
nominalValue: number;
totalInvested: number;
totalInterest: number;
finalBalance: number;
realValue: number;
estimatedTaxes: number;
inflationImpact: number;
managementFees: number;
chartData: { year: number; totalInvested: number; totalInterest: number; finalBalance: number }[];
}
export const defaultInvestmentCalculatorValues: IInvestmentCalculator = {
mode: 'basic',
initialInvestment: 65,
timeHorizon: 140,
monthlyContribution: 65,
returnRate: 7,
annualInflationRate: 2,
taxRate: 13,
investmentFees: 0.05,
annualContributionIncrease: 30,
nominalValue: 0,
totalInvested: 0,
totalInterest: 0,
finalBalance: 0,
realValue: 0,
estimatedTaxes: 0,
inflationImpact: 0,
managementFees: 0,
chartData: [],
};
export type IIdsList = 'chartData' | 'managementFees' | 'inflationImpact' | 'estimatedTaxes' | 'realValue' | 'finalBalance' | 'totalInterest' | 'totalInvested' | 'nominalValue' | 'annualContributionIncrease' | 'investmentFees' | 'taxRate' | 'annualInflationRate' | 'returnRate' | 'monthlyContribution' | 'timeHorizon' | 'initialInvestment';
export const chartSegments = writable(30);