Last active
October 1, 2015 06:00
-
-
Save charlesDADI/1824eff428428b941719 to your computer and use it in GitHub Desktop.
Revisions
-
charlesDADI revised this gist
May 24, 2014 . 1 changed file with 43 additions and 51 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -54,6 +54,15 @@ "</ul>\n" ] }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 9 }, { "cell_type": "markdown", "metadata": {}, @@ -142,13 +151,13 @@ { "metadata": {}, "output_type": "pyout", "prompt_number": 10, "text": [ "'/home/cerveau2charles'" ] } ], "prompt_number": 10 }, { "cell_type": "code", @@ -178,7 +187,7 @@ "language": "python", "metadata": {}, "outputs": [], "prompt_number": 11 }, { "cell_type": "raw", @@ -1869,7 +1878,7 @@ "\n", "print >> sys.stderr, 'Filtering the public timeline for \"%s\"' % (' '.join(sys.argv[1:]),)\n", "\n", "streaming_api.filter(follow=None, track=Q)" ], "language": "python", "metadata": {}, @@ -1915,12 +1924,13 @@ "language": "python", "metadata": {}, "outputs": [], "prompt_number": 21 }, { "cell_type": "code", "collapsed": false, "input": [ "import urllib2\n", "path_to_geocodes='http://www.weebly.com/uploads/1/8/5/4/18547470/tweetgeocoded.csv'\n", "geocode=ReturnAmazonGeocode(path_to_geocodes)\n", "geocode[0:10]" @@ -1931,7 +1941,7 @@ { "metadata": {}, "output_type": "pyout", "prompt_number": 23, "text": [ "[['39.38833542', ' -76.73633924'],\n", " [51.5035456, -0.2671622],\n", @@ -1946,7 +1956,7 @@ ] } ], "prompt_number": 23 }, { "cell_type": "code", @@ -1958,7 +1968,7 @@ "language": "python", "metadata": {}, "outputs": [], "prompt_number": 24 }, { "cell_type": "code", @@ -2011,13 +2021,13 @@ ], "metadata": {}, "output_type": "pyout", "prompt_number": 25, "text": [ "<IPython.core.display.Javascript at 0xb15e26c>" ] } ], "prompt_number": 25 }, { "cell_type": "code", @@ -2030,7 +2040,7 @@ "language": "python", "metadata": {}, "outputs": [], "prompt_number": 26 }, { "cell_type": "code", @@ -2087,7 +2097,7 @@ "language": "python", "metadata": {}, "outputs": [], "prompt_number": 27 }, { "cell_type": "code", @@ -2098,25 +2108,7 @@ "language": "python", "metadata": {}, "outputs": [], "prompt_number": 28 }, { "cell_type": "code", @@ -2133,13 +2125,13 @@ ], "metadata": {}, "output_type": "pyout", "prompt_number": 30, "text": [ "<IPython.core.display.HTML at 0xb15e28c>" ] } ], "prompt_number": 30 }, { "cell_type": "code", @@ -3551,13 +3543,13 @@ ], "metadata": {}, "output_type": "pyout", "prompt_number": 31, "text": [ "<IPython.core.display.Javascript at 0xb15e1ac>" ] } ], "prompt_number": 31 }, { "cell_type": "markdown", @@ -3604,13 +3596,13 @@ ], "metadata": {}, "output_type": "pyout", "prompt_number": 32, "text": [ "<IPython.core.display.HTML at 0xaa1a72c>" ] } ], "prompt_number": 32 }, { "cell_type": "code", @@ -3628,13 +3620,13 @@ ], "metadata": {}, "output_type": "pyout", "prompt_number": 33, "text": [ "<IPython.core.display.HTML at 0xaa1a0ac>" ] } ], "prompt_number": 33 }, { "cell_type": "code", @@ -3643,7 +3635,7 @@ "language": "python", "metadata": {}, "outputs": [], "prompt_number": 33 }, { "cell_type": "code", @@ -3661,13 +3653,13 @@ ], "metadata": {}, "output_type": "pyout", "prompt_number": 34, "text": [ "<IPython.core.display.HTML at 0xb15e10c>" ] } ], "prompt_number": 34 }, { "cell_type": "code", @@ -3685,13 +3677,13 @@ ], "metadata": {}, "output_type": "pyout", "prompt_number": 35, "text": [ "<IPython.core.display.HTML at 0xb1d018c>" ] } ], "prompt_number": 35 }, { "cell_type": "heading", -
charlesDADI revised this gist
May 24, 2014 . 1 changed file with 3723 additions and 0 deletions.There are no files selected for viewing
-
charlesDADI revised this gist
May 24, 2014 . 1 changed file with 0 additions and 3749 deletions.There are no files selected for viewing
-
charlesDADI revised this gist
May 24, 2014 . 1 changed file with 58 additions and 112 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ "level": 1, "metadata": {}, "source": [ "Art of trading Bitcoin and Measuring Risk part 1" ] }, { @@ -28,14 +28,14 @@ " <li>a-Ipython Notebook</li>\n", " <li>b-Python including database management, pandas, numpy, matplotlib </li>\n", " <li>c-Datavisualisation (d3.js)</li> \n", " <li>d-Trading strategy and backtest of several methods</li>\n", " <h3>I-Data</h3>\n", " <li>a-Where could we obtain historical and intraday data for many plateforms?</li>\n", " <li>b- What kind of data is available for BTC? and more generally for crypto-currency? </li>\n", " <li>c- How could we clean and store BTC data ?</li>\n", " <h3><li>II- Focus on two trading strategies to exploit BTC market characteristics.</h3>\n", " <li>a-What is scalping in forex and why it can be interesting for dealing BTC?</li>\n", " <li>b-How build up a systematic trading strategy based on TA (technical analysis)?</li>\n", " <li>c-Some ideas to go further and using Machine Learning</li>\n", " <h3>III- Backtest and Results</h3>\n", " <li>a-Scalping opportunities could disappear with the increasing of fees in next months</li>\n", @@ -58,9 +58,27 @@ "cell_type": "markdown", "metadata": {}, "source": [ "This ipython notebook can be useful for student in applied mathematics and computer science, data journalist, bitcoin enthusiast and anyone who love play with tricky data issues ..enjoy it and send me an email for any comment..<A HREF=\"mailto:charles-abner.dadi@graduates.centraliens.net\">charles-abner.dadi@graduates.centraliens.net</A>" ] }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [ { "ename": "SyntaxError", "evalue": "invalid syntax (<ipython-input-17-fb3f46ae173c>, line 1)", "output_type": "pyerr", "traceback": [ "\u001b[1;36m File \u001b[1;32m\"<ipython-input-17-fb3f46ae173c>\"\u001b[1;36m, line \u001b[1;32m1\u001b[0m\n\u001b[1;33m <a MAIL href=\"mailto:charlesabner.dadi@gmail.com?Subject=Hello%20again\" target=\"_top\">\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" ] } ], "prompt_number": 17 }, { "cell_type": "markdown", "metadata": {}, @@ -88,7 +106,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ "When you deal with BTC you should understand that BTC must not been considered as a currency. Why? First, it is not created by a central bank. Worst, it doesnt fit with the traditional definition of a currency which says that a currency should be a store of values, an unit of count and a medium of change. Despite, the incredible high volatilty avoids converting BTC into a store of value. But there are more obvious reasons to explain why BTC is not a currency. For instance, it is new and its is knowns that a currency should call confidence of a large part of people for becoming a currency." ] }, { @@ -339,7 +357,6 @@ "def remove_bitcoin_date_duplicates(frame):\n", " \"\"\"\n", " Remove bitcoin date duplicates by using (weighted) aggregation.\n", " \"\"\"\n", " # Aggregate duplicate dates\n", " frame['price'] = frame['price'] * frame['amount']\n", @@ -687,24 +704,11 @@ "prompt_number": 95 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now, we could plot the OHLC time series in the candlestick foramt and also compute some Technical indicators." ] }, { "cell_type": "code", @@ -3595,81 +3599,6 @@ "c-Data vizualisation" ] }, { "cell_type": "markdown", "metadata": {}, @@ -3693,13 +3622,13 @@ ], "metadata": {}, "output_type": "pyout", "prompt_number": 8, "text": [ "<IPython.core.display.HTML at 0x9ced20c>" ] } ], "prompt_number": 8 }, { "cell_type": "code", @@ -3717,21 +3646,22 @@ ], "metadata": {}, "output_type": "pyout", "prompt_number": 9, "text": [ "<IPython.core.display.HTML at 0x9ced02c>" ] } ], "prompt_number": 9 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 9 }, { "cell_type": "code", @@ -3749,13 +3679,13 @@ ], "metadata": {}, "output_type": "pyout", "prompt_number": 10, "text": [ "<IPython.core.display.HTML at 0x9ced4ac>" ] } ], "prompt_number": 10 }, { "cell_type": "code", @@ -3773,13 +3703,13 @@ ], "metadata": {}, "output_type": "pyout", "prompt_number": 11, "text": [ "<IPython.core.display.HTML at 0x9ced24c>" ] } ], "prompt_number": 11 }, { "cell_type": "heading", @@ -3795,6 +3725,22 @@ "source": [ "Before concluding this notebook I would remind you that this notebook and in particular financials parts doesn't meet the rigour that we should expected by reading a financial paper. Therefore this notebook doesn't include invesment advices or suggests. The main concern of this notebook is to highlight many data and statistical skills that could be re used in other studies. To summarize, we have insisted through this study in python ( numpy, panda, pymongo, sql in python, matplotlib), ipython notebook and some magic function such as %R, %html, google map.., d3.js tools.." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The next ipython notebook will treat how compute efficiently Value-At-Risk on BTC data... \n", "Feel free to contact me at <A HREF=\"mailto:charles-abner.dadi@graduates.centraliens.net\">charles-abner.dadi@graduates.centraliens.net</A>" ] }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} -
charlesDADI created this gist
May 24, 2014 .There are no files selected for viewing