1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
//! Models for mutual funds endpoints
use serde::{Deserialize, Serialize};
/// Mutual fund information
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MutualFund {
/// Fund symbol
pub symbol: Option<String>,
/// Fund name
pub name: Option<String>,
/// Fund family/company
pub fund_family: Option<String>,
/// Fund type
pub fund_type: Option<String>,
/// Investment category
pub category: Option<String>,
/// Investment objective
pub investment_objective: Option<String>,
/// Net asset value
pub nav: Option<f64>,
/// Previous NAV
pub previous_nav: Option<f64>,
/// NAV change
pub change: Option<f64>,
/// Percentage change
pub change_percent: Option<f64>,
/// Total assets (AUM)
pub total_assets: Option<f64>,
/// Expense ratio
pub expense_ratio: Option<f64>,
/// Minimum investment
pub minimum_investment: Option<f64>,
/// Yield
pub yield_: Option<f64>,
/// Inception date
pub inception_date: Option<String>,
/// Manager name
pub manager_name: Option<String>,
/// Currency
pub currency: Option<String>,
/// Exchange
pub exchange: Option<String>,
/// Last updated
pub last_updated: Option<String>,
}
/// Mutual fund historical price data
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MutualFundHistorical {
/// Date
pub date: Option<String>,
/// Net Asset Value (NAV)
pub nav: Option<f64>,
/// Adjusted NAV
pub adj_nav: Option<f64>,
/// Change from previous day
pub change: Option<f64>,
/// Percentage change
pub change_percent: Option<f64>,
/// Trading volume
pub volume: Option<i64>,
/// Symbol
pub symbol: Option<String>,
}
/// Mutual fund holdings information
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MutualFundHolding {
/// Holding symbol
pub symbol: Option<String>,
/// Security name
pub name: Option<String>,
/// Sector
pub sector: Option<String>,
/// Industry
pub industry: Option<String>,
/// Country
pub country: Option<String>,
/// Weight in portfolio (percentage)
pub weight_percentage: Option<f64>,
/// Market value
pub market_value: Option<f64>,
/// Number of shares held
pub shares_held: Option<i64>,
/// Asset type (stock, bond, etc.)
pub asset_type: Option<String>,
/// CUSIP identifier
pub cusip: Option<String>,
/// ISIN identifier
pub isin: Option<String>,
/// Date of holdings data
pub date: Option<String>,
}
/// Mutual fund performance metrics
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MutualFundPerformance {
/// Fund symbol
pub symbol: Option<String>,
/// Fund name
pub name: Option<String>,
/// 1 day return
pub one_day: Option<f64>,
/// 1 week return
pub one_week: Option<f64>,
/// 1 month return
pub one_month: Option<f64>,
/// 3 months return
pub three_months: Option<f64>,
/// 6 months return
pub six_months: Option<f64>,
/// Year to date return
pub ytd: Option<f64>,
/// 1 year return
pub one_year: Option<f64>,
/// 3 years return (annualized)
pub three_years: Option<f64>,
/// 5 years return (annualized)
pub five_years: Option<f64>,
/// 10 years return (annualized)
pub ten_years: Option<f64>,
/// Since inception return (annualized)
pub since_inception: Option<f64>,
/// Standard deviation (risk measure)
pub standard_deviation: Option<f64>,
/// Sharpe ratio
pub sharpe_ratio: Option<f64>,
/// Alpha
pub alpha: Option<f64>,
/// Beta
pub beta: Option<f64>,
/// R-squared
pub r_squared: Option<f64>,
/// Tracking error
pub tracking_error: Option<f64>,
/// Information ratio
pub information_ratio: Option<f64>,
/// Benchmark symbol
pub benchmark: Option<String>,
/// Performance date
pub date: Option<String>,
}
/// Mutual fund sector allocation
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MutualFundSector {
/// Sector name
pub sector: Option<String>,
/// Weight percentage in fund
pub weight_percentage: Option<f64>,
/// Market value
pub market_value: Option<f64>,
/// Date
pub date: Option<String>,
}
/// Mutual fund country allocation
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MutualFundCountry {
/// Country name
pub country: Option<String>,
/// Weight percentage in fund
pub weight_percentage: Option<f64>,
/// Market value
pub market_value: Option<f64>,
/// Date
pub date: Option<String>,
}