summaryrefslogtreecommitdiff
path: root/frontend/types/api.ts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/types/api.ts')
-rw-r--r--frontend/types/api.ts50
1 files changed, 50 insertions, 0 deletions
diff --git a/frontend/types/api.ts b/frontend/types/api.ts
index 8143d56..3b2cd70 100644
--- a/frontend/types/api.ts
+++ b/frontend/types/api.ts
@@ -25,6 +25,8 @@ export type Signal = {
};
export type TickerOverview = {
+ currency: string;
+ currency_warning: string | null;
profile: {
symbol: string;
name: string;
@@ -115,12 +117,33 @@ export type FinancialStatement = {
};
export type FinancialsResponse = {
+ currency: string;
+ currency_warning: string | null;
period: "annual" | "quarterly";
income: FinancialStatement;
balance: FinancialStatement;
cash_flow: FinancialStatement;
};
+export type AdvancedDcfInputs = {
+ base_revenue: number;
+ revenue_growth: number[];
+ ebitda_margin: number[];
+ dna_pct_revenue: number[];
+ capex_pct_revenue: number[];
+ nwc_chg_pct_delta_rev: number[];
+ tax_rate: number[];
+ wacc: number;
+ terminal_growth: number;
+ projection_years: number;
+};
+
+export type SensitivityMatrix = {
+ wacc: number[];
+ terminal_growth: number[];
+ implied_prices: (number | null)[][];
+};
+
export type DcfResult = {
available: boolean;
error?: string | null;
@@ -137,6 +160,8 @@ export type DcfResult = {
wacc: number;
terminal_growth: number;
projection_years: number;
+ sensitivity?: SensitivityMatrix | null;
+ advanced_inputs?: AdvancedDcfInputs | null;
};
export type MultipleResult = {
@@ -149,6 +174,8 @@ export type MultipleResult = {
};
export type ValuationResponse = {
+ currency: string;
+ currency_warning: string | null;
symbol: string;
current_price?: number | null;
shares_outstanding?: number | null;
@@ -158,6 +185,27 @@ export type ValuationResponse = {
price_to_book: MultipleResult;
};
+export type WaccResponse = {
+ currency: string;
+ currency_warning: string | null;
+ symbol: string;
+ available: boolean;
+ wacc?: number | null;
+ cost_of_equity?: number | null;
+ after_tax_cost_of_debt?: number | null;
+ risk_free_rate: number;
+ beta: number;
+ equity_risk_premium: number;
+ cost_of_debt: number;
+ tax_rate: number;
+ market_cap?: number | null;
+ total_debt?: number | null;
+ cash?: number | null;
+ net_debt?: number | null;
+ equity_weight?: number | null;
+ debt_weight?: number | null;
+};
+
export type RatioPoint = {
value: number | null;
spark: (number | null)[];
@@ -230,6 +278,8 @@ export type FilingsResponse = {
};
export type RatiosResponse = {
+ currency: string;
+ currency_warning: string | null;
pe_ttm: RatioPoint;
ev_ebitda: RatioPoint;
gross_margin: RatioPoint;