<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: The Mechanical Turk	</title>
	<atom:link href="https://financial-hacker.com/the-mechanical-turk/feed/" rel="self" type="application/rss+xml" />
	<link>https://financial-hacker.com/the-mechanical-turk/</link>
	<description>A new view on algorithmic trading</description>
	<lastBuildDate>Wed, 04 Dec 2024 19:41:25 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Romuald		</title>
		<link>https://financial-hacker.com/the-mechanical-turk/#comment-112068</link>

		<dc:creator><![CDATA[Romuald]]></dc:creator>
		<pubDate>Wed, 04 Dec 2024 19:41:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.financial-hacker.com/?p=2974#comment-112068</guid>

					<description><![CDATA[Hi jcl,

strange but when I try to generalize your equations within a Python code like this :

 # Equation parameters
        alpha = price_high - price_low       # Premiums
        DStr = strike_high - strike_low      # Strikes
        a = (2*alpha+DStr)/2
        b=DStr + alpha
        
        if L==0 : 
            M = b/(b-a)
            L = M
        else:
            M = b/(b-a)*(1+L*(alpha-b)/b)
            L = L + M

I get negative values or bigger than 1 values for L. Unless I am wrong in my generalized equations, do you see an error?
Here is what I get for SPY, DTE = 2025-01-17:
Probability for each strike interval:
Between 180.0 and 185.0: Probability = -1.3440
Between 185.0 and 190.0: Probability = -17.1920
Between 190.0 and 195.0: Probability = 33.0880
Between 195.0 and 200.0: Probability = -34.0520
Between 200.0 and 205.0: Probability = 32.6920
Between 205.0 and 210.0: Probability = -51.5360
Between 210.0 and 215.0: Probability = 64.6440
Between 215.0 and 220.0: Probability = -83.1360
Between 220, etc.]]></description>
			<content:encoded><![CDATA[<p>Hi jcl,</p>
<p>strange but when I try to generalize your equations within a Python code like this :</p>
<p> # Equation parameters<br />
        alpha = price_high &#8211; price_low       # Premiums<br />
        DStr = strike_high &#8211; strike_low      # Strikes<br />
        a = (2*alpha+DStr)/2<br />
        b=DStr + alpha</p>
<p>        if L==0 :<br />
            M = b/(b-a)<br />
            L = M<br />
        else:<br />
            M = b/(b-a)*(1+L*(alpha-b)/b)<br />
            L = L + M</p>
<p>I get negative values or bigger than 1 values for L. Unless I am wrong in my generalized equations, do you see an error?<br />
Here is what I get for SPY, DTE = 2025-01-17:<br />
Probability for each strike interval:<br />
Between 180.0 and 185.0: Probability = -1.3440<br />
Between 185.0 and 190.0: Probability = -17.1920<br />
Between 190.0 and 195.0: Probability = 33.0880<br />
Between 195.0 and 200.0: Probability = -34.0520<br />
Between 200.0 and 205.0: Probability = 32.6920<br />
Between 205.0 and 210.0: Probability = -51.5360<br />
Between 210.0 and 215.0: Probability = 64.6440<br />
Between 215.0 and 220.0: Probability = -83.1360<br />
Between 220, etc.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jcl		</title>
		<link>https://financial-hacker.com/the-mechanical-turk/#comment-82495</link>

		<dc:creator><![CDATA[jcl]]></dc:creator>
		<pubDate>Mon, 12 Sep 2022 13:59:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.financial-hacker.com/?p=2974#comment-82495</guid>

					<description><![CDATA[You&#039;re probably using multiple SPY option history files, not a single file history as in the original code. In that case you must give the asset name, or &#039;Asset&#039;, in the contractUpdate call.

contractUpdate(Asset,0,CALL&#124;PUT);

Otherwise Zorro only uses the already loaded data and that&#039;s only one year.]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re probably using multiple SPY option history files, not a single file history as in the original code. In that case you must give the asset name, or &#8216;Asset&#8217;, in the contractUpdate call.</p>
<p>contractUpdate(Asset,0,CALL|PUT);</p>
<p>Otherwise Zorro only uses the already loaded data and that&#8217;s only one year.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: luke		</title>
		<link>https://financial-hacker.com/the-mechanical-turk/#comment-82317</link>

		<dc:creator><![CDATA[luke]]></dc:creator>
		<pubDate>Sat, 03 Sep 2022 07:53:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.financial-hacker.com/?p=2974#comment-82317</guid>

					<description><![CDATA[Hi jcl, 
I tried to run the Turk2 script present in the version of Zorro S 2.50 but I get absurd results .. do you have any idea?
Test Turk2 SPY, Zorro 2.502

Simulated account   AssetsIB (NFA)
Bar period          24 hours (avg 2091 min)
Total processed     2617 bars
Test period         2012-01-05..2019-03-01 (1798 bars)
Lookback period     0 bars (0 minutes)
Montecarlo cycles   200
Simulation mode     Realistic 
Spread              2.0 pips (roll 0.00/0.00)
Commission          0.01
Lot size            1.00

Gross win/loss      21.62$-0$, +2161.9p, lr 8.53$
Average profit      3.02$/year, 0.25$/month, 0.0116$/day
Max drawdown        -0.37$ 1.7% (MAE -13.75$ 63.6%)
Total down time     0% (TAE 12%)
Max down time       34 hours from Jan 2012
Max open margin     64.02$
Max open risk       1.31$
Trade volume        128$ (17.91$/year)
Transaction costs   -0.0200$ spr, -0.0053$ slp, 0$ rol, -0.0100$ com
Capital required    64.26$

Number of trades    1 (1/year)
Percent winning     100.0%
Max win/loss        21.62$ / -0$
Avg trade profit    21.62$ 2161.9p (+2161.9p / -0.0p)
Avg trade slippage  -0.0053$ -0.5p (+0.0p / -0.0p)
Avg trade bars      268 (+268 / -0)
Max trade bars      268 (77 weeks)
Time in market      15%
Max open trades     1
Max loss streak     0 (uncorrelated 0)

Annual return       5%
Reward/Risk ratio   58.8
Sharpe ratio        0.45 (Sortino 0.47)
Kelly criterion     4.37
Annualized StdDev   10.39% 
R2 coefficient      0.000
Ulcer index         22.9%
Scholz tax          6 EUR

Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Total
2012   5   9   6  -1 -13   7   3   5   4  -4   1   0   +22
2013  11   0   0   0   0   0   0   0   0   0   0   0   +11
2014   0   0   0   0   0   0   0   0   0   0   0   0    +0
2015   0   0   0   0   0   0   0   0   0   0   0   0    +0
2016   0   0   0   0   0   0   0   0   0   0   0   0    +0
2017   0   0   0   0   0   0   0   0   0   0   0   0    +0
2018   0   0   0   0   0   0   0   0   0   0   0   0    +0
2019   0   0   0                                        +0

Confidence level     AR   DDMax  Capital
 10%                  5%     0   64.24$
 20%                  5%     0   64.25$
 30%                  5%     0   64.26$
 40%                  5%     0   64.27$
 50%                  5%     0   64.28$
 60%                  5%     0   64.30$
 70%                  5%     0   64.32$
 80%                  5%     1   64.36$
 90%                  5%     1   64.42$
 95%                  5%     1   64.47$
100%                  5%     1   64.58$

Portfolio analysis  OptF  ProF  Win/Loss   Wgt%

SPY:L               .1000  ++++    1/0    100.0]]></description>
			<content:encoded><![CDATA[<p>Hi jcl,<br />
I tried to run the Turk2 script present in the version of Zorro S 2.50 but I get absurd results .. do you have any idea?<br />
Test Turk2 SPY, Zorro 2.502</p>
<p>Simulated account   AssetsIB (NFA)<br />
Bar period          24 hours (avg 2091 min)<br />
Total processed     2617 bars<br />
Test period         2012-01-05..2019-03-01 (1798 bars)<br />
Lookback period     0 bars (0 minutes)<br />
Montecarlo cycles   200<br />
Simulation mode     Realistic<br />
Spread              2.0 pips (roll 0.00/0.00)<br />
Commission          0.01<br />
Lot size            1.00</p>
<p>Gross win/loss      21.62$-0$, +2161.9p, lr 8.53$<br />
Average profit      3.02$/year, 0.25$/month, 0.0116$/day<br />
Max drawdown        -0.37$ 1.7% (MAE -13.75$ 63.6%)<br />
Total down time     0% (TAE 12%)<br />
Max down time       34 hours from Jan 2012<br />
Max open margin     64.02$<br />
Max open risk       1.31$<br />
Trade volume        128$ (17.91$/year)<br />
Transaction costs   -0.0200$ spr, -0.0053$ slp, 0$ rol, -0.0100$ com<br />
Capital required    64.26$</p>
<p>Number of trades    1 (1/year)<br />
Percent winning     100.0%<br />
Max win/loss        21.62$ / -0$<br />
Avg trade profit    21.62$ 2161.9p (+2161.9p / -0.0p)<br />
Avg trade slippage  -0.0053$ -0.5p (+0.0p / -0.0p)<br />
Avg trade bars      268 (+268 / -0)<br />
Max trade bars      268 (77 weeks)<br />
Time in market      15%<br />
Max open trades     1<br />
Max loss streak     0 (uncorrelated 0)</p>
<p>Annual return       5%<br />
Reward/Risk ratio   58.8<br />
Sharpe ratio        0.45 (Sortino 0.47)<br />
Kelly criterion     4.37<br />
Annualized StdDev   10.39%<br />
R2 coefficient      0.000<br />
Ulcer index         22.9%<br />
Scholz tax          6 EUR</p>
<p>Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Total<br />
2012   5   9   6  -1 -13   7   3   5   4  -4   1   0   +22<br />
2013  11   0   0   0   0   0   0   0   0   0   0   0   +11<br />
2014   0   0   0   0   0   0   0   0   0   0   0   0    +0<br />
2015   0   0   0   0   0   0   0   0   0   0   0   0    +0<br />
2016   0   0   0   0   0   0   0   0   0   0   0   0    +0<br />
2017   0   0   0   0   0   0   0   0   0   0   0   0    +0<br />
2018   0   0   0   0   0   0   0   0   0   0   0   0    +0<br />
2019   0   0   0                                        +0</p>
<p>Confidence level     AR   DDMax  Capital<br />
 10%                  5%     0   64.24$<br />
 20%                  5%     0   64.25$<br />
 30%                  5%     0   64.26$<br />
 40%                  5%     0   64.27$<br />
 50%                  5%     0   64.28$<br />
 60%                  5%     0   64.30$<br />
 70%                  5%     0   64.32$<br />
 80%                  5%     1   64.36$<br />
 90%                  5%     1   64.42$<br />
 95%                  5%     1   64.47$<br />
100%                  5%     1   64.58$</p>
<p>Portfolio analysis  OptF  ProF  Win/Loss   Wgt%</p>
<p>SPY:L               .1000  ++++    1/0    100.0</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jcl		</title>
		<link>https://financial-hacker.com/the-mechanical-turk/#comment-77867</link>

		<dc:creator><![CDATA[jcl]]></dc:creator>
		<pubDate>Sun, 09 Jan 2022 09:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.financial-hacker.com/?p=2974#comment-77867</guid>

					<description><![CDATA[I know none. But it should not be too difficult to program one with the above algorithm.]]></description>
			<content:encoded><![CDATA[<p>I know none. But it should not be too difficult to program one with the above algorithm.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Romuald		</title>
		<link>https://financial-hacker.com/the-mechanical-turk/#comment-77866</link>

		<dc:creator><![CDATA[Romuald]]></dc:creator>
		<pubDate>Sun, 09 Jan 2022 08:34:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.financial-hacker.com/?p=2974#comment-77866</guid>

					<description><![CDATA[Hi JCL,

is there an equivalent native Python function for contractCPD() function?]]></description>
			<content:encoded><![CDATA[<p>Hi JCL,</p>
<p>is there an equivalent native Python function for contractCPD() function?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Romuald		</title>
		<link>https://financial-hacker.com/the-mechanical-turk/#comment-77593</link>

		<dc:creator><![CDATA[Romuald]]></dc:creator>
		<pubDate>Fri, 24 Dec 2021 16:13:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.financial-hacker.com/?p=2974#comment-77593</guid>

					<description><![CDATA[Yes, I am actually making tests in real on different time intervals and different symbols. I will publish the results here.]]></description>
			<content:encoded><![CDATA[<p>Yes, I am actually making tests in real on different time intervals and different symbols. I will publish the results here.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jcl		</title>
		<link>https://financial-hacker.com/the-mechanical-turk/#comment-77557</link>

		<dc:creator><![CDATA[jcl]]></dc:creator>
		<pubDate>Thu, 23 Dec 2021 16:43:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.financial-hacker.com/?p=2974#comment-77557</guid>

					<description><![CDATA[It is less effective in short periods because the predicted price is then too close to the current price. But I did not run very extensive tests - maybe you can find a way to make it work on short periods.]]></description>
			<content:encoded><![CDATA[<p>It is less effective in short periods because the predicted price is then too close to the current price. But I did not run very extensive tests &#8211; maybe you can find a way to make it work on short periods.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Romuald		</title>
		<link>https://financial-hacker.com/the-mechanical-turk/#comment-77556</link>

		<dc:creator><![CDATA[Romuald]]></dc:creator>
		<pubDate>Thu, 23 Dec 2021 16:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.financial-hacker.com/?p=2974#comment-77556</guid>

					<description><![CDATA[Hi JCL,

sorry for my previous post, it is useless. After installing new version of Zorro all is working perfectly. I should have checked before posting... By the way, your article is very interesting and novative. Should this methode be working for shorter periods, like 14 days?]]></description>
			<content:encoded><![CDATA[<p>Hi JCL,</p>
<p>sorry for my previous post, it is useless. After installing new version of Zorro all is working perfectly. I should have checked before posting&#8230; By the way, your article is very interesting and novative. Should this methode be working for shorter periods, like 14 days?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jcl		</title>
		<link>https://financial-hacker.com/the-mechanical-turk/#comment-77513</link>

		<dc:creator><![CDATA[jcl]]></dc:creator>
		<pubDate>Wed, 22 Dec 2021 09:49:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.financial-hacker.com/?p=2974#comment-77513</guid>

					<description><![CDATA[2.30 was a very old version, but should work with this script. Even if not, there is no line in the script that would cause a crash. I suspect a more serious reason, like a corrupted installation. Get a recent Zorro, install it, and run the script again. The current version is 2.44. Run also a malware check on that PC, just to be on the safe side.]]></description>
			<content:encoded><![CDATA[<p>2.30 was a very old version, but should work with this script. Even if not, there is no line in the script that would cause a crash. I suspect a more serious reason, like a corrupted installation. Get a recent Zorro, install it, and run the script again. The current version is 2.44. Run also a malware check on that PC, just to be on the safe side.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Romuald		</title>
		<link>https://financial-hacker.com/the-mechanical-turk/#comment-77496</link>

		<dc:creator><![CDATA[Romuald]]></dc:creator>
		<pubDate>Tue, 21 Dec 2021 22:30:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.financial-hacker.com/?p=2974#comment-77496</guid>

					<description><![CDATA[Hi JCL,

when running the script predicting the price in 6 weeks, it connects correctly to my IB, but then gives me back the error : &quot;Error 111 crash in main : main()&quot;. Do you know how I can fix this issue? Zorro version is 2.30.]]></description>
			<content:encoded><![CDATA[<p>Hi JCL,</p>
<p>when running the script predicting the price in 6 weeks, it connects correctly to my IB, but then gives me back the error : &#8220;Error 111 crash in main : main()&#8221;. Do you know how I can fix this issue? Zorro version is 2.30.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
