{"action":"created","comment":{"url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls/comments/40514728","id":40514728,"diff_hunk":"@@ -0,0 +1,518 @@\n+package VolSurface::Calibration::SABR;\n+\n+=head1 NAME\n+\n+VolSurface::Calibration::SABR\n+\n+=head1 DESCRIPTION\n+\n+SABR is a calibration model that is used in volatility surface calibration.\n+\n+=cut\n+\n+use Moose::Role;\n+\n+requires qw(symbol surface term_by_day smile_points parameterization);\n+\n+use Date::Utility;\n+use List::MoreUtils qw(pairwise first_index indexes);\n+use List::Util qw(min max);\n+use Math::Trig qw(tanh);\n+use Try::Tiny;\n+use Format::Util::Numbers qw(roundnear);\n+#use DataDog::DogStatsd::Helper qw(stats_gauge);","path":"lib/VolSurface/Calibration/SABR.pm","position":23,"original_position":23,"commit_id":"7820882f1bb7ca16ef96dadf3ac68d49ee9dfbf8","original_commit_id":"7820882f1bb7ca16ef96dadf3ac68d49ee9dfbf8","user":{"login":"mm-binary","id":9294049,"avatar_url":"https://avatars.githubusercontent.com/u/9294049?v=3","gravatar_id":"","url":"https://api.github.com/users/mm-binary","html_url":"https://github.com/mm-binary","followers_url":"https://api.github.com/users/mm-binary/followers","following_url":"https://api.github.com/users/mm-binary/following{/other_user}","gists_url":"https://api.github.com/users/mm-binary/gists{/gist_id}","starred_url":"https://api.github.com/users/mm-binary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mm-binary/subscriptions","organizations_url":"https://api.github.com/users/mm-binary/orgs","repos_url":"https://api.github.com/users/mm-binary/repos","events_url":"https://api.github.com/users/mm-binary/events{/privacy}","received_events_url":"https://api.github.com/users/mm-binary/received_events","type":"User","site_admin":false},"body":"Sure.","created_at":"2015-09-28T02:26:46Z","updated_at":"2015-09-28T02:26:46Z","html_url":"https://github.com/binary-com/perl-VolSurface-Calibration-SABR/pull/1#discussion_r40514728","pull_request_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls/comments/40514728"},"html":{"href":"https://github.com/binary-com/perl-VolSurface-Calibration-SABR/pull/1#discussion_r40514728"},"pull_request":{"href":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls/1","id":45991818,"html_url":"https://github.com/binary-com/perl-VolSurface-Calibration-SABR/pull/1","diff_url":"https://github.com/binary-com/perl-VolSurface-Calibration-SABR/pull/1.diff","patch_url":"https://github.com/binary-com/perl-VolSurface-Calibration-SABR/pull/1.patch","issue_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/issues/1","number":1,"state":"open","locked":false,"title":"initial commit","user":{"login":"mm-binary","id":9294049,"avatar_url":"https://avatars.githubusercontent.com/u/9294049?v=3","gravatar_id":"","url":"https://api.github.com/users/mm-binary","html_url":"https://github.com/mm-binary","followers_url":"https://api.github.com/users/mm-binary/followers","following_url":"https://api.github.com/users/mm-binary/following{/other_user}","gists_url":"https://api.github.com/users/mm-binary/gists{/gist_id}","starred_url":"https://api.github.com/users/mm-binary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mm-binary/subscriptions","organizations_url":"https://api.github.com/users/mm-binary/orgs","repos_url":"https://api.github.com/users/mm-binary/repos","events_url":"https://api.github.com/users/mm-binary/events{/privacy}","received_events_url":"https://api.github.com/users/mm-binary/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-25T09:18:47Z","updated_at":"2015-09-28T02:26:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af5a9e542ec2ae438ed264dad90d9785a0ecdb10","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls/1/commits","review_comments_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls/1/comments","review_comment_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls/comments{/number}","comments_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/issues/1/comments","statuses_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/statuses/7820882f1bb7ca16ef96dadf3ac68d49ee9dfbf8","head":{"label":"mm-binary:mm/initial_movement","ref":"mm/initial_movement","sha":"7820882f1bb7ca16ef96dadf3ac68d49ee9dfbf8","user":{"login":"mm-binary","id":9294049,"avatar_url":"https://avatars.githubusercontent.com/u/9294049?v=3","gravatar_id":"","url":"https://api.github.com/users/mm-binary","html_url":"https://github.com/mm-binary","followers_url":"https://api.github.com/users/mm-binary/followers","following_url":"https://api.github.com/users/mm-binary/following{/other_user}","gists_url":"https://api.github.com/users/mm-binary/gists{/gist_id}","starred_url":"https://api.github.com/users/mm-binary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mm-binary/subscriptions","organizations_url":"https://api.github.com/users/mm-binary/orgs","repos_url":"https://api.github.com/users/mm-binary/repos","events_url":"https://api.github.com/users/mm-binary/events{/privacy}","received_events_url":"https://api.github.com/users/mm-binary/received_events","type":"User","site_admin":false},"repo":{"id":42643679,"name":"perl-VolSurface-Calibration-SABR","full_name":"mm-binary/perl-VolSurface-Calibration-SABR","owner":{"login":"mm-binary","id":9294049,"avatar_url":"https://avatars.githubusercontent.com/u/9294049?v=3","gravatar_id":"","url":"https://api.github.com/users/mm-binary","html_url":"https://github.com/mm-binary","followers_url":"https://api.github.com/users/mm-binary/followers","following_url":"https://api.github.com/users/mm-binary/following{/other_user}","gists_url":"https://api.github.com/users/mm-binary/gists{/gist_id}","starred_url":"https://api.github.com/users/mm-binary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mm-binary/subscriptions","organizations_url":"https://api.github.com/users/mm-binary/orgs","repos_url":"https://api.github.com/users/mm-binary/repos","events_url":"https://api.github.com/users/mm-binary/events{/privacy}","received_events_url":"https://api.github.com/users/mm-binary/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mm-binary/perl-VolSurface-Calibration-SABR","description":"SABR volatility surface calibration","fork":true,"url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR","forks_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/forks","keys_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/teams","hooks_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/hooks","issue_events_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/issues/events{/number}","events_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/events","assignees_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/assignees{/user}","branches_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/branches{/branch}","tags_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/tags","blobs_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/git/refs{/sha}","trees_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/statuses/{sha}","languages_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/languages","stargazers_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/stargazers","contributors_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/contributors","subscribers_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/subscribers","subscription_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/subscription","commits_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/commits{/sha}","git_commits_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/git/commits{/sha}","comments_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/comments{/number}","issue_comment_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/issues/comments{/number}","contents_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/contents/{+path}","compare_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/merges","archive_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/downloads","issues_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/issues{/number}","pulls_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/pulls{/number}","milestones_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/milestones{/number}","notifications_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/labels{/name}","releases_url":"https://api.github.com/repos/mm-binary/perl-VolSurface-Calibration-SABR/releases{/id}","created_at":"2015-09-17T08:10:12Z","updated_at":"2015-09-17T08:02:16Z","pushed_at":"2015-09-28T02:10:37Z","git_url":"git://github.com/mm-binary/perl-VolSurface-Calibration-SABR.git","ssh_url":"git@github.com:mm-binary/perl-VolSurface-Calibration-SABR.git","clone_url":"https://github.com/mm-binary/perl-VolSurface-Calibration-SABR.git","svn_url":"https://github.com/mm-binary/perl-VolSurface-Calibration-SABR","homepage":null,"size":88,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"binary-com:master","ref":"master","sha":"9c0b64cd1c17e25257c3f89899738c9d4ad5c350","user":{"login":"binary-com","id":7437559,"avatar_url":"https://avatars.githubusercontent.com/u/7437559?v=3","gravatar_id":"","url":"https://api.github.com/users/binary-com","html_url":"https://github.com/binary-com","followers_url":"https://api.github.com/users/binary-com/followers","following_url":"https://api.github.com/users/binary-com/following{/other_user}","gists_url":"https://api.github.com/users/binary-com/gists{/gist_id}","starred_url":"https://api.github.com/users/binary-com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binary-com/subscriptions","organizations_url":"https://api.github.com/users/binary-com/orgs","repos_url":"https://api.github.com/users/binary-com/repos","events_url":"https://api.github.com/users/binary-com/events{/privacy}","received_events_url":"https://api.github.com/users/binary-com/received_events","type":"Organization","site_admin":false},"repo":{"id":42643269,"name":"perl-VolSurface-Calibration-SABR","full_name":"binary-com/perl-VolSurface-Calibration-SABR","owner":{"login":"binary-com","id":7437559,"avatar_url":"https://avatars.githubusercontent.com/u/7437559?v=3","gravatar_id":"","url":"https://api.github.com/users/binary-com","html_url":"https://github.com/binary-com","followers_url":"https://api.github.com/users/binary-com/followers","following_url":"https://api.github.com/users/binary-com/following{/other_user}","gists_url":"https://api.github.com/users/binary-com/gists{/gist_id}","starred_url":"https://api.github.com/users/binary-com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binary-com/subscriptions","organizations_url":"https://api.github.com/users/binary-com/orgs","repos_url":"https://api.github.com/users/binary-com/repos","events_url":"https://api.github.com/users/binary-com/events{/privacy}","received_events_url":"https://api.github.com/users/binary-com/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/binary-com/perl-VolSurface-Calibration-SABR","description":"SABR volatility surface calibration","fork":false,"url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR","forks_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/forks","keys_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/keys{/key_id}","collaborators_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/teams","hooks_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/hooks","issue_events_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/issues/events{/number}","events_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/events","assignees_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/assignees{/user}","branches_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/branches{/branch}","tags_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/tags","blobs_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/git/refs{/sha}","trees_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/git/trees{/sha}","statuses_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/statuses/{sha}","languages_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/languages","stargazers_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/stargazers","contributors_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/contributors","subscribers_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/subscribers","subscription_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/subscription","commits_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/commits{/sha}","git_commits_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/git/commits{/sha}","comments_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/comments{/number}","issue_comment_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/issues/comments{/number}","contents_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/contents/{+path}","compare_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/compare/{base}...{head}","merges_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/merges","archive_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/downloads","issues_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/issues{/number}","pulls_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls{/number}","milestones_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/milestones{/number}","notifications_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/labels{/name}","releases_url":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/releases{/id}","created_at":"2015-09-17T08:02:16Z","updated_at":"2015-09-17T08:02:16Z","pushed_at":"2015-09-28T02:10:38Z","git_url":"git://github.com/binary-com/perl-VolSurface-Calibration-SABR.git","ssh_url":"git@github.com:binary-com/perl-VolSurface-Calibration-SABR.git","clone_url":"https://github.com/binary-com/perl-VolSurface-Calibration-SABR.git","svn_url":"https://github.com/binary-com/perl-VolSurface-Calibration-SABR","homepage":null,"size":108,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls/1"},"html":{"href":"https://github.com/binary-com/perl-VolSurface-Calibration-SABR/pull/1"},"issue":{"href":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/issues/1"},"comments":{"href":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/binary-com/perl-VolSurface-Calibration-SABR/statuses/7820882f1bb7ca16ef96dadf3ac68d49ee9dfbf8"}}}}