<commit_before># -*- coding: utf-8 -*-

import numpy as np
from pandas import Timestamp, DateOffset
from datetime import datetime
import copy

class BasicOption(object):
    def __init__(self):
        self._underlying_close_price = None
        self._dividend = 0.0
        self._expiry_date = None
        self._trade_date = None
        self._forward_price = None
        self._exercise_type = 'european'
        self._zero_rate = None

    def set_exercise_type(self, exercise_type):
        self._exercise_type = exercise_type
        return self

    def set_time_to_maturity(self, time_to_maturity_in_days):
        if self.get_evaluation_date() is None:
            self.set_evaluation_date(Timestamp(datetime.now().strftime('%Y-%m-%d')))<commit_msg>add serialization functionality<commit_after># -*- coding: utf-8 -*-

import copy
from datetime import datetime

import numpy as np
from pandas import Timestamp, DateOffset


class BasicOption(object):
    def __init__(self):
        self._underlying_close_price = None
        self._dividend = 0.0
        self._expiry_date = None
        self._trade_date = None
        self._forward_price = None
        self._exercise_type = 'european'
        self._zero_rate = None

    def set_exercise_type(self, exercise_type):
        self._exercise_type = exercise_type
        return self

    def set_time_to_maturity(self, time_to_maturity_in_days):
        if self.get_evaluation_date() is None:
            self.set_evaluation_date(Timestamp(datetime.now().strftime('%Y-%m-%d')))
{'fraction_non_alphanumeric': 0.08854166666666667, 'fraction_numerical': 0.00390625, 'mean_word_length': 3.0341207349081363, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '94875', 'n_tokens_mistral': 478, 'n_tokens_neox': 456, 'n_words': 103}