fmp_rs/models/
valuation.rs1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(rename_all = "camelCase")]
8pub struct Dcf {
9 pub symbol: String,
11 pub date: String,
13 pub dcf: Option<f64>,
15 pub stock_price: Option<f64>,
17}
18
19#[derive(Debug, Clone, Serialize, Deserialize)]
21#[serde(rename_all = "camelCase")]
22pub struct HistoricalDcf {
23 pub symbol: String,
25 pub date: String,
27 pub dcf: Option<f64>,
29 pub stock_price: Option<f64>,
31}
32
33#[derive(Debug, Clone, Serialize, Deserialize)]
35#[serde(rename_all = "camelCase")]
36pub struct AdvancedDcf {
37 pub symbol: String,
39 pub date: String,
41 pub dcf: Option<f64>,
43 pub stock_price: Option<f64>,
45 pub revenue_growth: Option<f64>,
47 pub operating_margin: Option<f64>,
49 pub tax_rate: Option<f64>,
51 pub wacc: Option<f64>,
53 pub terminal_growth_rate: Option<f64>,
55 #[serde(default)]
57 pub free_cash_flows: Vec<f64>,
58}
59
60#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(rename_all = "camelCase")]
63pub struct LeveredDcf {
64 pub symbol: String,
66 pub date: String,
68 pub levered_dcf: Option<f64>,
70 pub stock_price: Option<f64>,
72 pub enterprise_value: Option<f64>,
74 pub total_debt: Option<f64>,
76 pub cash_and_equivalents: Option<f64>,
78}
79
80#[derive(Debug, Clone, Serialize, Deserialize)]
82#[serde(rename_all = "camelCase")]
83pub struct EnterpriseValue {
84 pub symbol: String,
86 pub date: String,
88 pub stock_price: Option<f64>,
90 pub number_of_shares: Option<f64>,
92 pub market_capitalization: Option<f64>,
94 pub minus_cash_and_cash_equivalents: Option<f64>,
96 pub add_total_debt: Option<f64>,
98 pub enterprise_value: Option<f64>,
100}