Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/caching ci cd #42

Merged
merged 4 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
30 changes: 15 additions & 15 deletions .github/workflows/pr_ci.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
name: Pull Request CI

on: # On what action this workflow will be triggered
on:
pull_request:
branches:
- main
- dev

jobs:
build:
name: Build & Run All Tests # Give the build job an appropriate name
name: Build & Run All Tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4 # to use node20 instead of node12 and node 16 which are deprecated

- name: Cache CMake files
uses: actions/cache@v3
with:
path: |
build/CMakeFiles
build/CMakeCache.txt
build/compile_commands.json
key: ${{ runner.os }}-cmake-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-cmake-build-
uses: actions/checkout@v4

#- name: Cache CMake files
# uses: actions/cache@v3
# with:
# path: |
# build/CMakeFiles
# build/CMakeCache.txt
# build/compile_commands.json
# key: ${{ runner.os }}-cmake-build-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-cmake-build-

- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2 # Use the latest major version for stability
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.26.3'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4 # to use node20 instead of node12 and node 16 which are deprecated
uses: actions/checkout@v4

- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2 # Use the latest major version for stability
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.26.3'

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ bin/
bckp
flattened_folder

.DS_Store

ideas

3 changes: 3 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ add_library(solver SHARED
target_link_libraries(option PUBLIC marketdata payoff)
target_link_libraries(model PUBLIC option random)
target_link_libraries(solver PUBLIC option model numerical_analysis Boost::random Eigen3::Eigen)
target_link_libraries(numerical_analysis PUBLIC Eigen3::Eigen)

# Create main executable
add_executable(Option_pricer main.cpp)
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
The **Option Pricer** is a C++ library designed to model and price various financial options, such as European, American, and exotic path-dependent options (e.g., Asian, Barrier).
It is optimized for financial institutions, quantitative analysts, and researchers who need fast, flexible, and accurate option pricing methods.

This library complies with **SOLID** principles and leverages modern C++ features (up to C++20).
It incorporates various design patterns to ensure maintainability and extensibility.
The library supports multiple pricing methods, including **Monte Carlo simulations** and **Finite Difference Methods (FDM)**, giving users the flexibility to select the most appropriate solver for their needs.

## Table of Contents
Expand Down Expand Up @@ -71,7 +69,7 @@ vcpkg install eigen3 boost-random gtest
### Build Instructions
1. Clone the repository:
```
git clone https://github.com/anthonymakarewicz/option_pricer.git
git clone https://github.com/anthonymakarewicz/option-pricer.git option_pricer
cd option_pricer
```

Expand Down Expand Up @@ -122,9 +120,9 @@ params.setParameter("K", K);

// Create a European call and American Put using the factory method
EuropeanOptionFactory europeanFactory;
AmericanOptionFactory factory;
AmericanOptionFactory americanFactory;
std::shared_ptr<Option> europeanCall = europeanFactory.createCallOption(params);
std::shared_ptr<AmericanOption> americanPut = factory.createPutOption(params);
std::shared_ptr<AmericanOption> americanPut = americanFactory.createPutOption(params);
```

### 2. Pricing an European call option with Finite Difference Method
Expand Down
26 changes: 0 additions & 26 deletions ideas/custome_excpetion-factory.txt

This file was deleted.

53 changes: 0 additions & 53 deletions ideas/factories/templated_factory.h

This file was deleted.

63 changes: 0 additions & 63 deletions ideas/logger/di_async.h

This file was deleted.

53 changes: 0 additions & 53 deletions ideas/logger/di_sync.h

This file was deleted.

43 changes: 0 additions & 43 deletions ideas/logger/singleton_async.h

This file was deleted.

Loading
Loading