Created
January 1, 2017 23:44
-
-
Save sangheestyle/3d06449d4d1420f305baa4f6a1106254 to your computer and use it in GitHub Desktop.
Practicing wash sell model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Required data:\n", | |
"\n", | |
"* type: string\n", | |
"* name: string\n", | |
"* quantity: int\n", | |
"* price: float\n", | |
"* buy date: date\n", | |
"* sell date: date\n", | |
"* repurchase date: date\n", | |
"\n", | |
"# What's expected from the required data:\n", | |
"\n", | |
"* wash sale period: int: sell date - 30 < wash sale period < sell date + 30\n", | |
"\n", | |
"# User scenario:\n", | |
"\n", | |
"* User A buy 30 Samsung stock * 100.05 dollars on yesterday\n", | |
"\n", | |
"\n", | |
"## Input\n", | |
"* type: stock\n", | |
"* name: Samsung\n", | |
"* quantity: 30\n", | |
"* price: 100.05\n", | |
"* buy date: 2017-01-01\n", | |
"* sell date: 2017-01-02\n", | |
"\n", | |
"## Output\n", | |
"* wash sale period: 2017-01-02 - 20 days < 2017-01-02 < 2017-01-02 + 30 days\n", | |
" * Requirement: repurchase date" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"\n" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 2", | |
"language": "python", | |
"name": "python2" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 2 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython2", | |
"version": "2.7.10" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment