#pragma once

#include "OptionPricer.h"

class CapletOptionPricer : public OptionPricer
{
private:

	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Constants for option price
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	double m_dcp_di_left_factor;
	double m_dcp_di_right;
	double m_dcp_all_factor;

	double m_forward_libor;
	double m_accrual_factor;


public:

	CapletOptionPricer(const std::string& ub_error, double t1_df, double time, double df, double caplet_volatility, double accrual_factor, double forward_libor);

	double digital_option_in_arrears_price(double k) const override;
};