3.15.13 research
TRANSCRIPT
-
7/29/2019 3.15.13 Research
1/18
Automated Data Analysis
FEBRUARY 25, 2013
Doing research lately I realized I was duplicating a lot of my efforts in terms of gathering and organizing data
for analysis. I decided to invest some time creating databases and macros that could do this for me and
make it easier to do analysis going forward.
I started with commodity futures data from Quandl.com which is a great data website. It also has an API for
calling specific date ranges and data.
First I created a list of the commodities I needed and made a macro in Excel that would download this. The
macro would go through the list of products I needed data for, and request them for the date ranges
specified in cells C1 and D1. It would then save them by symbol name in a folder.
So after running the macro the folder would contain the price data for the commodities requested. In this
case there was a small range downloaded so I have a number of small CSV files.
Next I used VBA in Access to import the CSV data into the
database tables for the related commodities.
As shown below there is now tables for each contract, and
each tables has OHLC data as well as volume and open
interest.
-
7/29/2019 3.15.13 Research
2/18
In order to avoid pulling unnecessary amounts of data back into Excel to analyze I made a union query
which would return the data needed. In this case front and back month corn since 1/1/2013.
Once in excel I used to a pivot table to organize the data which made it easier to graph.
Lastly I created different charts. The following pages are the automated reports I had Excel generate for
corn, soy and wheat.
-
7/29/2019 3.15.13 Research
3/18
-
7/29/2019 3.15.13 Research
4/18
-
7/29/2019 3.15.13 Research
5/18
RelationshipsbetweenUSDACropProgressReportsandCornYields.
2012
FromApriltoNovembertheUSDepartmentofAgriculturereleasesaweeklyreporttitledCropProgressand
ConditionswhichprovidesinformationonthegrowthcycleandconditionsofmajorgraincropsintheUS.These
reportsareanimportantsourceofinformationforcommoditymarketsandhavethepotentialtocauselargechanges
inprice.
Thereportisacompilationofsurveystakenfromapproximately4,000respondentswhoprovidesubjectiveratings
andcategorizecropsasVeryPoor,Poor,Fair,GoodorExcellent.TheUSDAthenprovidestheaggregatepercentageof
eachcrop,ineachstate,whichfallsintoeachcategory.
Whilebreadthoftheweeklysurveysandthemethodologyprovidesvaluabledata,theUSDAspresentationofthe
datamakesitdifficulttoanalyze.
Forexample,whentryingtocomparetwoweekstherearefivedifferentchangesthathavetobechecked.Inthis
hypotheticalscenariotheamountratedExcellenthasdropped5%,theamountratedPoorhasdropped10%and
theamountratedFairhasincreased15%.
Week1 Week2
Excellent 10% 5%
Good 20% 20%
Fair 30% 45%
Poor 30% 20%
VeryPoor 10% 10%
Althoughthisisvaluabledata,itishandicappedthroughpresentationandreporting,makingitdifficultrunstatistical
analysisortocomparetohistoricaldata.
Eveninthecurrentformvisualrepresentationdoesnotprovidemoreinsight.
InordertocondensetheweeklyreportoffivedifferentcategoriesandcorrespondingpercentagesIhavecreateda
numericalratingscalewithweightedcategoriestocomeupwithanaggregateratingwith1equalingVeryPoorand5
equalingExcellent.
Applyingthistotheprevioushypotheticalexampleweseethattheoverallchangesinthecategoriesleftthe
conditionsunchanged
-
7/29/2019 3.15.13 Research
6/18
Week1 Week2
Excellent 5 10% =0.50 5% =0.25
Good 4 20% =0.80 20% =0.80
Fair 3 30% =0.90 45% =1.35Poor 2 30% =0.60 20% =0.40
VeryPoor 1 10% =0.10 10% =0.10
2.9
2.9
Inthisexample,theaverageratingforWeek1and2was2.9,whichismarginallybelowFair(3).
InordertoanalyzethisdataIranqueriesagainsttheUSDAsAgriculturalMarketingServicesdatabasewhichIthen
importedintoMicrosoftAccess.Cornratingsforeverystategoingbackto1986producedover55,000entriesinthe
database.
Icreatedqueriestopullspecificstatesandyears.IalsoutilizedcalculatedfieldsinAccesstoproducetheaggregate
foreachweekforeachstate.
RatingNumber:IIf([Corn]="Excellent",5,(IIf([Corn]="Good",4,(IIf([Corn]="Fair",3,(IIf([Corn]="Poor",2,(IIf([Corn]="Very
Poor",1)))))))))
Weighted:[RatingNumber]*[Rating]*0.01
Creatingthisaggregateallowsforeasycomparisonsacrossyears.Accessqueriescanbemadeforspecifiedstatesand
yearsandthenlinkedtoExcel.OnceinExcelitseasytoanalyzethedataorchartit.
Belowisanexampleoftheweeklyaggregatefrom2007-2012,with2012bolded.ThisdatawasfromWeek#25which
correspondedtotheJune11th
reportin2012.Althoughthischartshowstheconditionsweremarkedlypoorerthan
previousyears,themarketforSeptembercornfuturesclosedat$5.37onthedayofthereport.Thefollowingweek
futuresbegantheirrallywhichtoppedoutwithSeptembercornhitting$8.43
-
7/29/2019 3.15.13 Research
7/18
TheJuly9th
reportshowedexcessivedeteriorationinIowaquality,withSeptembercornfuturesclosingat$7.31.
Theaggregatechartsmakeiteasytocomparestatesandalsovisualizetheconditionsrelativetopreviousyears.For
example,Indianawasespeciallyhardhitduringthedroughtof2012andthismethodputsitintoperspectivewith
otheryears.
Indroughtyearssuchas2012marketsoftenlookforanalogyearswithsimilarconditionsinordertohavehistorical
referencefortrading.For2012theoftencitedanalogyearswere1988and1993.IcreatedAccessqueriestopulland
comparethisdata.Additionally,Ialsocreatedanotherindexwhichcomparedaveragecropratingsfrombetween
2006-2011forcomparisonwithdroughtyears.
-
7/29/2019 3.15.13 Research
8/18
Anotheradvantageforaggregatingtheratingsisthatitallowsforyearlyaveragesofconditions.Duringthecourseof
theyearfinalyieldestimatesfromtheUSDA,aswellasprivatecompanies,havemajorimpactsonmarketsas
participantsreadjustsupply/demandmodels.Giventhatcropconditionsthroughouttheyeararecloselylinkedtothe
finalofficialyieldIwantedtolookathowwelltheaverageyearlycropratingmatchedwiththefinalreportedyield.
-
7/29/2019 3.15.13 Research
9/18
Icreatedascatterplotfrom2000to2012witheachstatesaverageratingandfinalrealizedyield.
Theseshowabroadcorrelationbetweenaverageyieldandaggregateannualcroprating.Oneinterestingoutlieris
SouthDakotawhoseratingstendtobemoreoptimisticthantheothereightmajorproducingstates.
Thiscanbethenanalyzedbyindividualstatesandlinearregressionlinescanbecreatedtoquantifythetrends.For
Iowa,duringthisperiodthelinearregressionequationisy=0.0129x+1.5717.IftheaveragecropconditionwasFair(3)
forayearthiswouldsuggestafinalendingyieldof110bushelsperacre,whileifitwereGood(4)thiswouldsuggesta
yieldof188bpa.
-
7/29/2019 3.15.13 Research
10/18
Thiscanberunforotherstatesaswell.ForinstanceNebraskaslinearregressionisy=0.0199x+0.6353whichforaan
averageyearlyratingofFair(3)suggestionsa118bpayieldandforGood(4)suggestions169bpsyield.Thisflatter
relationshipimpliesthat,relativetoIowa,Nebraskacornyieldsfluctuatelessasreportedcropconditionschange.
-
7/29/2019 3.15.13 Research
11/18
UsingtheequationforeachstateslinearregressionIcalculatedthedifferencebetweentheimpliedtrendlineyield
andthefinalrealizedyield.Thisshowstheaggregateyearlyaveragetobequiteaccuratewiththelargestpercentage
beinglessthan5bpaawayfromthefinalyield.
-
7/29/2019 3.15.13 Research
12/18
Thisaccuracydatacananalyzedbystate
StateAvgdifference
Max Min Range
NE 0.35 13.89 -10.27 24.16
KS 0.23 14.39 -16.71 31.09
WI 0.1 14.39 -20.32 34.71
MN 0.37 11.42 -23.89 35.32
SD -0.12 17.67 -22.16 39.83
IN -0.34 13.79 -32.65 46.45
OH -0.1 22.46 -26.55 49.01
IA -0.1 27.27 -26.8 54.07
IL 0.01 33.72 -33.89 67.61
Andbyyear
StateAvg
difference Max Min Range
2000 -21.58 -2.33 -33.89 31.56
2001 -9.6 2.13 -19.59 21.72
2002 2.64 17.12 -6.67 23.79
2003 -1 10.66 -10.18 20.84
2004 1.01 8.85 -8.78 17.63
2005 7.77 33.72 -4.37 38.09
2006 0.31 17.63 -7.94 25.57
2007 0.89 15.11 -10.27 25.38
2008 3.96 13.39 -5.2 18.59
2009 7.86 17.67 -5.46 23.14
2010 -7.05 3.87 -23.14 27.01
2011 3.29 15.95 -3.23 19.18
2012 12.09 27.27 2.77 24.5
Oneinterestingtakeawayfromthisdataishowmuch2012exceededexpectations.BetweenJanuaryandthe
beginningofJune2012cornpricestradedbetween$5and$6.Duringmid-JunetoAugustpricesspikedto$8.43on
August10.Sincethen,priceshavefallenwithDecembercornfuturesreachingaSeptember29lowof$7.05.
The2012correlationdatashowsthatthefinalrealizedyieldwas12bpahigherthanthecropconditionsimpliedyield.
Thisisbiggestoutperformanceinthesampleseriesandsuggestedthemarketoverpricedriskearliertheyearbefore
readjustingafterharvest.Alsothataccuracyoftheimpliedyieldcalculationsdecreasesinextremeyearssuchas2012.
-
7/29/2019 3.15.13 Research
13/18
Corn Update 1/29/13
JANUARY 30, 2013
Lately RBOB/Ethanol spread has been widening. However this is mostly due to the strength in the RBOB
market being greater than the strength in the ethanol market, rather than ethanol weakness.
The correlation between ethanol and corn has been weakening, as ethanol prices have been strong relative
to corn prices and thereby increasing margins for ethanol plants.
Given the low carryout number in the January WASDE we need old crop higher to ration demand and prior
to the report the prices werent high enough to do this. With margins increasing the demand reduction is
unlikely to come from ethanol. Its possible that feed usage with decrease, but it remains to be seen if that
will happen.
Technically there can be a case to be made for
the long side in March corn. Its broken through
the descending trendline and has been
consolidating after the last supply and demand
report. Its also above the rising 20, 50 and 200
day moving averages. And 710 has proved to
be an important level that has held as well.
However looking at linear regressions from the
August peak March corn has been selling off
and is now just back at the top of range.
-
7/29/2019 3.15.13 Research
14/18
To grind or not to grind
JANUARY 29, 2013
Recently POET made headlines for idling its Macon, Missouri plant due primarily to a lack of available local
corn. Given that its a large operator and the announcement made many headlines, I felt it deserved a
closer look.
According to Ethanol Producer Magazine, Macon is one of the only plants POET runs that currently doesnt
do corn oil extraction. POET runs 27 plants, has their own corn oil extraction technology, and Macon is one
of the 2 plants that doesnt have this. Extracting co-product value has been especially important since the
tax credits expired, even more so after the drought.
POET is private company so for comparison I looked at the breakdown of operating profits for Green Plains
Renewable Energy on their most recent 10-Q for the impact of corn oil.
In this case GPRE has been losing money on ethanol production for the 9 months ending 9/31/2012 but co-
products like corn oil are becoming an important source of income that can help to offset losses.
Also, basis in northeastern Missouri has traded on the lower end of the range for Missouri according to data
from USDA AMS and doesnt seem high when comparing to other bids for the Midwest.
-
7/29/2019 3.15.13 Research
15/18
Although the closure is attributed to lack of corn supply in the area it seems like adding corn oil extraction to
the plant before new crop could also be a major factor.
-
7/29/2019 3.15.13 Research
16/18
National DDGS Price Comparisons
FEBRUARY 3, 2012
USDA AMS has a page for running custom reports from their data which is useful for DDGS data(http://marketnews.usda.gov/portal/)
Pulling data from around the country I created a national average price and looked at how 100 day moving
averages for different regions traded at premiums or discounts.
Of course Chicago and Iowa are trading at a discount. But I found the variability and seasonality of the
Kansas to be surprising. The Kansas prices usually bottom in the summer and then stay higher in the winter
when there is more feed demand.
With the amount of the DDGS that is still going to China, Kansas seems like a potential shipping point.
There is a large intermodal facility in Kansas City and a few ethanol plants nearby. However no plants in thearea have container-loading capacity and most can easily truck out their capacity. Given the large premium
Kansas is currently trading at it wouldnt make sense unless DDGS was sourced from Iowa, and by then any
comparative advantage would be gone due to transportation cost. Also intermodal shipping costs to China
are very similar if shipping from Kansas City or Chicago.
Taking another look at Chicago and California prices in one of the longer data series. The California
premium has really strengthened since 2008.
-
7/29/2019 3.15.13 Research
17/18
Last thing I found interesting was how closely Western Iowa and Chicago traded. Given how much capacity
in Western Iowa I assumed it would be trading at a larger discount to Chicago. However for most of 2011
they have traded in lockstep. Possibly due to the production in Illinois as well large marketing firms being
able to transport huge quantities out of Western Iowa by rail.
-
7/29/2019 3.15.13 Research
18/18
Chinese DDGS Imports
JANUARY 2, 2012
For a while the Chinese Commerce Ministry has been doing an anti-dumping investigation into US DDGS
exports to China. Recently they announced this investigation would continue until June 28th.
Admittedly China doesnt have a lot of choice when it comes to US export to China that it can limit, but an
investigation into DDGS is an obvious paper tiger. Reuters points out that last week China asked the US to
lift duties on Chinese-made tires so China is likely trying to use DDGS restrictions as leverage. The problem
is China would be hurting themselves more than the US if they imposed restrictions so this is an empty
threat.
1.Chinese ethanol producers requested the investigation but they are marginal players. Their total DDGS
output is 3.5m tonnes. Total US productions for marketing year 09-10 is ~39m tonnes. Total US exports to
China January to August 2011 is 805k tonnes. Chinese ethanol producers are also not going to be
increasing output given that Premier Wen said on October 22 that China needs to strictly control ethanol
production. Domestic demand is higher than their production can satisfy and they arent going to be able to
increase production.
2. Even if Chinese domestic production was enough to satisfy feed mill demand there would still be demand
for US DDGS. Growing conditions in China results higher level of mycotoxins and Chinese DDGS trades at
a discount to US DDGS. Containerized DDGS can be shipped closer to feedmills in southern China reducing
the need for slow and expensive inland transit from the ethanol plants in the north.
3. China doesnt have the luxury of limiting food imports. DDGS can only be used as animal feed so limiting
its import directly leads to meat inflation. If you are fining companies like Unilever for even talking about aprice increase for shampoo, you are not in position to do anything that could lead to actual food inflation.
4. Not exporting to China would hurt the US, but not that much. Even though China is the #2 export market
there werent sizeable exports until 2008. Most US DDGS can be used domestically. Even now 60% more
is being exported to Mexico than to China. Canada is the 3rd biggest market. Canada and Mexico also have
the advantage of being serviced by rail, making it much cheaper than containerized shipments to China.
Its hard to imagine China doing anything substantial given the it would lead to directly to food inflation, there
isnt a viable domestic alternative and the damage to the US ethanol industry would be limited.