A comprehensive web-based financial derivatives trading and valuation platform built with C# .NET Core and advanced Monte Carlo simulation techniques.
This project is an option pricing and portfolio management system developed for a Financial Modeling course. It demonstrates advanced quantitative finance concepts through practical implementation.
- 6 Option Types: European, Asian, Digital, Lookback, Range, and Barrier options
- Advanced Simulation Techniques:
- Box-Muller random number generation
- Antithetic variance reduction
- Control variates for improved accuracy
- Multithreading for performance optimization
- Greeks Calculation: Delta, Gamma, Vega, Theta, Rho
- Real-time P&L Analysis
- Portfolio valuation and risk assessment
- 7-Step Workflow: Units → Exchanges → Markets → Underlyings → Derivatives → Trades → Valuation
- Real-time option pricing with configurable parameters
- Interactive web interface with Bootstrap styling
- Entity Framework Core with PostgreSQL
- Table-Per-Type inheritance for financial instruments
- Normalized database design for scalability
- Back-end: C# .NET 6.0, ASP.NET Core Web API
- Database: PostgreSQL with Entity Framework Core
- Front-end: HTML5, CSS3, JavaScript, Bootstrap
- Architecture: RESTful API, MVC pattern
- .NET 6.0 SDK
- PostgreSQL database
- Modern web browser
- Clone the repository
git clone https://github.com/MadisonMLi/financial-modeling.git- Configure database connection in
appsettings.json
{
"ConnectionStrings": {
"DefaultConnection": "host=localhost;Database=postgres;Username=postgres;Password=your_password"
}
}- Run database migrations
dotnet ef database update- Start the application
dotnet run- Navigate to
http://localhost:5000to access the web interface
- Navigate to Units → Exchanges → Markets → Underlyings
- Create the underlying asset and market structure
- Go to Derivatives and select "European"
- Set strike price, expiration, and option parameters
- Create a trade in the Trades section
- Use Trade Valuation to get Monte Carlo pricing and Greeks
- Configure simulation parameters (steps, simulations, variance reduction)
- View real-time Greeks for portfolio risk management
- Analyze P&L and market sensitivities
- Number of Simulations: 10,000 (default)
- Time Steps: 100 (default)
- Variance Reduction: Antithetic variates, Control variates
- Multithreading: Enabled for performance
- Risk-free Rate: Configurable (default: 5%)
- Dividend Yield: Configurable (default: 3%)
- Volatility: Configurable (default: 20%)