Rustnance

Downloads Version License

Synopsis

A crate that provides functionality within the space of financial analysis

Explanation

This crate is meant to provide calculations as well as metrics and should not be seen as any financial or investing advice. The intent is to firstly develop calculation for fundamental analysis but technical analysis related functionality may be added. Some of the existing functions you will find consist of:

Usage

Inside your Cargo.toml toml [dependencies] rustnance = "0.2.1" # Latest version Example usage ```rust use rustnance::value; // Bring module into scope fn main() { let freecashflow: Vec = vec![1000.0, 2000.0, 3000.0, 4000.0, 5000.0]; // Historical free cash flow let expectedreturn: f32 = 0.15; // The return you expect to achieve from an investment let outstandingshares: f32 = 1000.0; // Amount of shares that excist for the specific company let marginof_safety: f32 = 0.3; // A margin of safety to take into account for the uncertainty of any calculation

let intrinsic_value: f32 = value::calculate_intrinsic_value(&free_cash_flow, &expected_return);
let intrinsic_value_per_share: f32 = value::intrinsic_value_per_stock(&intrinsic_value, &outstanding_shares);
let share_buy_price: f32 = value::margin_of_safety(&intrinsic_value_per_share, &margin_of_safety);
println!("A reasonable price would be: {}", share_buy_price);

} ```

Module structure

Output of <code>cargo modules generate tree</code>

Find a bug?

If you found a bug, an issue, an improvement or a potential addition to this project, please submit an issue(if it hasn't already been raised) using the issue tab towards the top. I intend to fix issues as they arise as well as add requested functionality.