Skip to content

Instantly share code, notes, and snippets.

Daisy Xu Daijunxu

Block or report user

Report or block Daijunxu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Daijunxu
Daijunxu / holtwinters.py
Created Nov 25, 2017 — forked from andrequeiroz/holtwinters.py
Implementation of Holt-Winters algorithms in Python 2
View holtwinters.py
#The MIT License (MIT)
#
#Copyright (c) 2015 Andre Queiroz
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
View Vectorizing
%% Import test data
CLC=xlsread('CL.xlsx','CallOptions');
%% plot and compare
figure % CL
% Call option of CL
% Bisection methods
[EstimatedPrice,Interations,CL_B_call_bid]=arrayfun(@bisection_iv,CLC(:,3),CLC(:,1),CLC(:,2),0.0012.*ones(length(CLC),1),0.25.*ones(length(CLC),1));
subplot(2,2,1);plot(CL_B_call_bid,CLC(:,2))
View IV_calculator
% Implied Volatility Calculator
% Daijun Xu
% Project 3
%%
% The function will estimate the market implied volatility of put and call
% options based on Black Scholers model. I got CL and MSFT option data from
% Yahoo!Finance for vectorization test and plot. And you can also use your
% own data(as scalars) to calculate.
%%
function []=IV_calculator()
You can’t perform that action at this time.