|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 | 4 | "cell_type": "code",
|
5 |
| - "execution_count": 23, |
| 5 | + "execution_count": 37, |
6 | 6 | "metadata": {},
|
7 | 7 | "outputs": [],
|
8 | 8 | "source": [
|
|
24 | 24 | },
|
25 | 25 | {
|
26 | 26 | "cell_type": "code",
|
27 |
| - "execution_count": 24, |
| 27 | + "execution_count": 38, |
28 | 28 | "metadata": {
|
29 | 29 | "scrolled": false
|
30 | 30 | },
|
|
45 | 45 | " for date in dateList:\n",
|
46 | 46 | " new_df = df[(df.date == date)]\n",
|
47 | 47 | " day = renkoScript(new_df, paramEntry, newDay, renkoDeque, stockType, verbose)\n",
|
48 |
| - " if verbose:\n", |
49 |
| - " print(date, newDay.money, day.money, day.dailyTrades)\n", |
50 |
| - " day.printOpenTrade()\n", |
| 48 | + "# if verbose:\n", |
| 49 | + "# print(date, newDay.money, day.money, day.dailyTrades)\n", |
| 50 | + "# day.printOpenTrade()\n", |
51 | 51 | " sellEndOfDay = getSellEndOfDay(date, stockType)\n",
|
52 | 52 | " newDay = day.initializeNextDay(sellEndOfDay) \n",
|
53 | 53 | " yearlyProfitPercentage = (day.money - 1) * 100\n",
|
54 |
| - " print(yearlyProfitPercentage)\n", |
55 | 54 | " paramEntry.profitPercentage = yearlyProfitPercentage\n",
|
56 | 55 | " paramEntry.toString()\n",
|
57 | 56 | " \n",
|
|
60 | 59 | },
|
61 | 60 | {
|
62 | 61 | "cell_type": "code",
|
63 |
| - "execution_count": 25, |
| 62 | + "execution_count": 39, |
64 | 63 | "metadata": {
|
65 | 64 | "scrolled": true
|
66 | 65 | },
|
|
69 | 68 | "def bruteAnalysis(stockName, parameterDict, pool, threadPoolSize):\n",
|
70 | 69 | " csvList = []\n",
|
71 | 70 | " parameterGrid = getParameterGrid(parameterDict)\n",
|
72 |
| - " folderName = \"IntradayData_2018\"\n", |
| 71 | + " folderName = \"NIFTY50_APR2019\"\n", |
73 | 72 | " df, dateList = preProcessData(folderName, stockName, [], [], 'blah')\n",
|
74 | 73 | " parameterGridSize = len(parameterGrid)\n",
|
75 | 74 | " print('param combination = ' , parameterGridSize)\n",
|
|
94 | 93 | },
|
95 | 94 | {
|
96 | 95 | "cell_type": "code",
|
97 |
| - "execution_count": 29, |
| 96 | + "execution_count": 43, |
98 | 97 | "metadata": {},
|
99 | 98 | "outputs": [],
|
100 | 99 | "source": [
|
|
105 | 104 | "def getRenkoParameterDict():\n",
|
106 | 105 | " brickHeightPercentage = [0.05, 0.1, 0.15, 0.2, 0.25, 0.3]\n",
|
107 | 106 | " stepCount = [3,4,5,7]\n",
|
| 107 | + "# brickHeightPercentage = [0.1]\n", |
| 108 | + "# stepCount = [3]\n", |
| 109 | + "\n", |
108 | 110 | " parameterDict = {\n",
|
109 | 111 | " 'brickHeightPercentage' : brickHeightPercentage, \n",
|
110 | 112 | " 'stepCount': stepCount\n",
|
|
114 | 116 | },
|
115 | 117 | {
|
116 | 118 | "cell_type": "code",
|
117 |
| - "execution_count": 30, |
| 119 | + "execution_count": 44, |
118 | 120 | "metadata": {},
|
119 | 121 | "outputs": [],
|
120 | 122 | "source": [
|
121 |
| - "stockList = futuresList" |
| 123 | + "# stockList = futuresList\n", |
| 124 | + "stockList= ['RELIANCE']" |
122 | 125 | ]
|
123 | 126 | },
|
124 | 127 | {
|
125 | 128 | "cell_type": "code",
|
126 |
| - "execution_count": 28, |
| 129 | + "execution_count": 45, |
127 | 130 | "metadata": {
|
128 | 131 | "scrolled": false
|
129 | 132 | },
|
|
132 | 135 | "name": "stdout",
|
133 | 136 | "output_type": "stream",
|
134 | 137 | "text": [
|
135 |
| - "('param combination = ', 1)\n", |
136 |
| - "-31.373428498947497\n", |
137 |
| - "Stock Name: INFRATEL_F1, brickHeightPercentage: 0.01, stepCount: 3, ProfitPer: -31.3734284989\n", |
138 |
| - "('Time - ', 13.298845052719116)\n", |
139 |
| - "(1, 1)\n" |
| 138 | + "('param combination = ', 24)\n", |
| 139 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.05, stepCount: 3, ProfitPer: 10.8800270526\n", |
| 140 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.05, stepCount: 4, ProfitPer: 11.1136777732\n", |
| 141 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.05, stepCount: 7, ProfitPer: 8.17639153333\n", |
| 142 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.05, stepCount: 5, ProfitPer: 8.17698244068\n", |
| 143 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.1, stepCount: 3, ProfitPer: 3.16982711066\n", |
| 144 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.1, stepCount: 4, ProfitPer: 2.99321250018\n", |
| 145 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.1, stepCount: 5, ProfitPer: 3.673524544\n", |
| 146 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.15, stepCount: 3, ProfitPer: 0.656039089039\n", |
| 147 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.1, stepCount: 7, ProfitPer: 5.37036767574\n", |
| 148 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.15, stepCount: 4, ProfitPer: 1.34306333272\n", |
| 149 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.2, stepCount: 3, ProfitPer: 2.6812010044\n", |
| 150 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.25, stepCount: 3, ProfitPer: 0.949150597136\n", |
| 151 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.3, stepCount: 4, ProfitPer: 1.3982007996\n", |
| 152 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.25, stepCount: 4, ProfitPer: -1.55801819262\n", |
| 153 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.3, stepCount: 5, ProfitPer: -1.85965765906\n", |
| 154 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.2, stepCount: 4, ProfitPer: 1.32914882046\n", |
| 155 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.3, stepCount: 3, ProfitPer: -0.342861582287\n", |
| 156 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.15, stepCount: 5, ProfitPer: 1.99747764747\n", |
| 157 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.2, stepCount: 5, ProfitPer: 0.22987113645\n", |
| 158 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.25, stepCount: 5, ProfitPer: -0.0522027992085\n", |
| 159 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.2, stepCount: 7, ProfitPer: 2.02072316558\n", |
| 160 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.25, stepCount: 7, ProfitPer: -0.394424572498\n", |
| 161 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.3, stepCount: 7, ProfitPer: -2.27922991042\n", |
| 162 | + "Stock Name: RELIANCE, brickHeightPercentage: 0.15, stepCount: 7, ProfitPer: 0.62004189417\n", |
| 163 | + "('Time - ', 8.692453145980835)\n", |
| 164 | + "(24, 24)\n" |
140 | 165 | ]
|
141 | 166 | }
|
142 | 167 | ],
|
|
0 commit comments