FinanceSim 0.1.0
Financial Simulation Library
Loading...
Searching...
No Matches
financesim Namespace Reference

Classes

class  AccountBase
 
class  AccountEvent
 Event emitted when an account balance changes. More...
 
class  AssetEvent
 Event emitted when asset value changes. More...
 
class  AssetsBase
 
class  CareerJob
 Career job income model with semi-monthly salary payments. More...
 
class  CheckingAccount
 Checking account - the default income recipient, no interest earned. More...
 
class  ConsoleWriter
 Writes formatted log output to console (stdout) More...
 
class  Event
 Base class for all typed events in the simulation. More...
 
class  EventBus
 
class  ExpenseEvent
 Event emitted when an expense occurs. More...
 
class  ExpensesBase
 
class  IncomeBase
 
class  IncomeEvent
 Event emitted when income is received. More...
 
class  JsonWriter
 Writes events as JSON lines to a file. More...
 
class  LiabilitiesBase
 
class  LiabilityEvent
 Event emitted when liability value changes. More...
 
class  Logger
 
class  LogWriter
 Interface for log output writers. More...
 
class  Model
 
class  SavingsAccount
 Savings account - earns APY interest, compounded monthly. More...
 
struct  Schedule
 
class  TransferEvent
 Event emitted when funds are transferred between accounts. More...
 

Typedefs

using EventPtr = std::shared_ptr< const Event >
 
using EventCallback = std::function< void(const EventPtr &)>
 Callback type for event subscribers.
 
using SubscriptionId = std::size_t
 Subscription handle for unsubscribing.
 
using LogWriterPtr = std::shared_ptr< LogWriter >
 
using ModelPtr = std::shared_ptr< Model >
 
using SimTime = double
 Represents a point in simulation time (continuous, in days)
 

Enumerations

enum class  LogLevel { DEBUG = 0 , INFO = 1 , WARN = 2 , ERROR = 3 }
 Log severity levels for filtering. More...
 
enum class  ExecutionTiming { StartOfPeriod , EndOfPeriod }
 Configuration for when a model executes within its period. More...
 

Functions

const char * log_level_to_string (LogLevel level)
 Convert LogLevel to string representation.
 
Schedule make_account_schedule ()
 Helper to create default schedule for accounts (no periodic updates)
 
Schedule make_savings_schedule ()
 Helper to create default schedule for savings accounts (monthly interest)
 

Typedef Documentation

◆ EventCallback

using financesim::EventCallback = typedef std::function<void(const EventPtr&)>

Callback type for event subscribers.

Definition at line 13 of file event_bus.hpp.

◆ EventPtr

using financesim::EventPtr = typedef std::shared_ptr<const Event>

Definition at line 32 of file event.hpp.

◆ LogWriterPtr

using financesim::LogWriterPtr = typedef std::shared_ptr<LogWriter>

Definition at line 29 of file log_writer.hpp.

◆ ModelPtr

using financesim::ModelPtr = typedef std::shared_ptr<Model>

Definition at line 44 of file model.hpp.

◆ SimTime

using financesim::SimTime = typedef double

Represents a point in simulation time (continuous, in days)

Definition at line 6 of file time.hpp.

◆ SubscriptionId

using financesim::SubscriptionId = typedef std::size_t

Subscription handle for unsubscribing.

Definition at line 16 of file event_bus.hpp.

Enumeration Type Documentation

◆ ExecutionTiming

enum class financesim::ExecutionTiming
strong

Configuration for when a model executes within its period.

Enumerator
StartOfPeriod 
EndOfPeriod 

Definition at line 9 of file time.hpp.

◆ LogLevel

enum class financesim::LogLevel
strong

Log severity levels for filtering.

Enumerator
DEBUG 
INFO 
WARN 
ERROR 

Definition at line 6 of file log_level.hpp.

Function Documentation

◆ log_level_to_string()

const char * financesim::log_level_to_string ( LogLevel  level)
inline

Convert LogLevel to string representation.

Definition at line 14 of file log_level.hpp.

References DEBUG, ERROR, INFO, and WARN.

Referenced by financesim::ConsoleWriter::write(), and financesim::JsonWriter::write().

Here is the caller graph for this function:

◆ make_account_schedule()

Schedule financesim::make_account_schedule ( )
inline

Helper to create default schedule for accounts (no periodic updates)

Definition at line 9 of file account_base.hpp.

References financesim::Schedule::rate.

Referenced by PYBIND11_MODULE().

Here is the caller graph for this function:

◆ make_savings_schedule()

Schedule financesim::make_savings_schedule ( )
inline

Helper to create default schedule for savings accounts (monthly interest)

Definition at line 8 of file savings_account.hpp.

References financesim::Schedule::rate.

Referenced by PYBIND11_MODULE().

Here is the caller graph for this function: