pub struct FinancialModelingLibrary { /* private fields */ }Expand description
Financial Modeling Library Manager
Implementations§
Source§impl FinancialModelingLibrary
impl FinancialModelingLibrary
Sourcepub fn initialize(&mut self) -> Result<(), FinancialError>
pub fn initialize(&mut self) -> Result<(), FinancialError>
Initialize the library
Sourcepub fn create_portfolio(
&mut self,
portfolio: Portfolio,
) -> Result<FinancialOperationResult<Portfolio>, FinancialError>
pub fn create_portfolio( &mut self, portfolio: Portfolio, ) -> Result<FinancialOperationResult<Portfolio>, FinancialError>
Create a new portfolio
Sourcepub fn calculate_portfolio_risk(
&mut self,
portfolio_id: &str,
) -> Result<FinancialOperationResult<RiskMetrics>, FinancialError>
pub fn calculate_portfolio_risk( &mut self, portfolio_id: &str, ) -> Result<FinancialOperationResult<RiskMetrics>, FinancialError>
Calculate portfolio risk
Sourcepub fn price_option(
&mut self,
option_params: OptionParameters,
) -> Result<FinancialOperationResult<OptionPrice>, FinancialError>
pub fn price_option( &mut self, option_params: OptionParameters, ) -> Result<FinancialOperationResult<OptionPrice>, FinancialError>
Price an option
Sourcepub fn execute_trade(
&mut self,
order: Order,
) -> Result<FinancialOperationResult<TradeResult>, FinancialError>
pub fn execute_trade( &mut self, order: Order, ) -> Result<FinancialOperationResult<TradeResult>, FinancialError>
Execute a trade
Sourcepub fn check_compliance(
&mut self,
portfolio_id: &str,
) -> Result<FinancialOperationResult<ComplianceResult>, FinancialError>
pub fn check_compliance( &mut self, portfolio_id: &str, ) -> Result<FinancialOperationResult<ComplianceResult>, FinancialError>
Check compliance
Sourcepub fn get_performance_stats(&self) -> FinancialPerformanceMetrics
pub fn get_performance_stats(&self) -> FinancialPerformanceMetrics
Get performance statistics
Sourcepub fn list_portfolios(&self) -> Vec<String>
pub fn list_portfolios(&self) -> Vec<String>
List all portfolios
Sourcepub fn get_portfolio_info(&self, portfolio_id: &str) -> Option<Portfolio>
pub fn get_portfolio_info(&self, portfolio_id: &str) -> Option<Portfolio>
Get portfolio information
Auto Trait Implementations§
impl !Freeze for FinancialModelingLibrary
impl RefUnwindSafe for FinancialModelingLibrary
impl Send for FinancialModelingLibrary
impl Sync for FinancialModelingLibrary
impl Unpin for FinancialModelingLibrary
impl UnsafeUnpin for FinancialModelingLibrary
impl UnwindSafe for FinancialModelingLibrary
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more