Also available as PDF (figures and tables appear in the PDF).
Whether weather variables improve agricultural price forecasts is usually answered on average, yet theory and some evidence suggest that weather matters only in particular regimes, such as drought. This study turns the question into one about conditional value: when does weather help, and can a rule detect those occasions in real time, Using weekly potato prices with temperature and precipitation (January 2003 – September 2023), three forecasters are compared in an expanding-window walk-forward design covering about 15 years of out-of-sample forecasts: a naive no-change forecast (A), a price-only machine-learning model (B) and a model that adds lagged temperature and precipitation (C). A confidence gate, which opens only when a model has shown consistent level-accuracy and turning-point improvements over its reference on recently realised origins, is applied to B versus A and to C versus B, and raw prices are compared with Kalman-filled prices as inputs. Price-only models clearly beat the naive forecast at four weeks ahead (relative MAE 0.85-0.90, Diebold-Mariano p < 0.001) but not significantly at one week. Weather did not improve accuracy on average at either horizon: relative to B, model C ranged from about 0.99 to 1.02 times B’s error and was significantly worse for ridge regression at four weeks (p = 0.017). The gate between C and B stayed mostly closed (5-21% of origins), and its open and closed states were no better than chance at identifying periods in which weather later helped; the gate between B and A cost accuracy relative to always using B, because B was already reliably better than naive at four weeks. Descriptively, weather added value in the three drought years in the evaluation sample (MAE ratio 0.97 at one week versus 1.03 in other years), but the contrast was not statistically significant (p = 0.064). Kalman-filled inputs helped modestly for boosted trees at one week. The results support a conditional, regime-specific view of weather in these data but show that detecting the regime from recent forecast performance is hard, so a null result for the gate is informative about the limits of detecting conditional value.
Keywords: potato prices; weather variables; forecast gating; Kalman filter; walk-forward evaluation; condi- tional predictive ability; potatoprices; weathervariables; forecastgating; Kalmanfilter; walk-forwardevaluation; condi- tionalpredictiveability onlymachine-learningmodelandaprice-plus-weather
Potato is a staple, perishable and storage-sensitive cropwhosewholesalepriceswingssharplyfromseasontoseason. Farmers, cold-storageoperatorsand tradersneedforecaststotimesalesandstorage,and policymakersneedearlywarningofpricespikesthat squeezehouseholdbudgets(Gilbert&Morgan,2010; Tomek&Peterson,2001;Wright,2011).Becauseagriculturaloutputdependsontemperatureandrainfall (Schlenker&Roberts, 2009; Lobelletal., 2011), itis naturaltoaddweathervariablestoprice-forecasting models,andalargeappliedliteraturedoessoonthe premisethatweatherisaninformativeleadingindicatorofsupplyandthereforeofprice.
Theempiricalrecordis, however, mixed. Studiesof forecastingcompetitionsandbenchmarkcomparisons show that added complexity and added predictors often fail to beat simple benchmarks out of sample (Makridakisetal.,2018,2020;Petropoulosetal.,2022), andtheequity-premiumandexchange-rateliteratures have long warned that predictors that look useful in sample frequently lose their value in forecasting (Meese&Rogoff,1983;Goyal&Welch,2008;Stock& Watson,2003).Inagriculturalmarketsthereisafurther reasontoexpectweakaverageeffects:weatheraffects pricesmainlythroughextremesupplyshortfalls,while inordinaryseasonsstorage,tradeandpolicyabsorb weathervariation. Ifso,thevalueofweatherisconditional:negligibleinnormalyearsandsubstantialin drought.Averagingoverregimesthenhidestheeffect andmayleadaresearchertoconclude,wrongly,that weatherdoesnotmatteratall.
Aconditionaleffectposesasecond,operationalquestion.Evenifweatherhelpsonlyinparticularregimes, a forecaster in real time does not know the regime inadvance. Anaturalsolutionisagatethatletsthe weather-augmentedmodelspeakonlywhenithasrecentlyshownthatitismoreaccuratethanaweatherfreeone.Relatedideasexistinforecastcombination, where weights shift toward recent winners (Bates & Granger,1969;Timmermann,2006),andinconditional predictiveabilitytesting(Giacomini&White,2006;Giacomini&Rossi,2010),buttoourknowledge,nobody hasaskedwhethersuchagatecanactuallydetectthe regimesinwhichweatherhelps,norwhetherthedual criteriaoflevelaccuracyandturning-pointskill,which mattertodecisionmakers,canbeassessedonashort windowofrecentforecasts.
Thispaperthereforeasksnotwhetherweatherhelps onaveragebutwhenithelpsandwhetherthatcanbe detected.Threeforecastersarecomparedonweekly potato prices: a naive no-change forecast, a pricemodel. Thestudyexamineswhetherprice-onlymachinelearningbeatsthenaiveforecast,whetheradding laggedtemperatureandprecipitationimprovesonthe price-onlymodelonaverageandwithindrought-like andotherregimes,andwhetheraconfidencegateappliedtotheprice-onlyversusnaivecomparisonandto theweatherversusprice-onlycomparisonopensatthe righttimes. Italsotestswhetherfeedingthemodels aKalman-filledpriceseriesinsteadoftherawseries, whichcontainsgaps, substitutesforgatingoralters theconclusions.Anullresult,inwhichthegaterarely opensoropensatrandom,isitselfinformativeabout theconditionalvalueofweatherandaboutthelimitsofrecent-performancerules.Theremainderofthe paperreviewstheliterature(Section2),describesthe data(Section3),setsoutthemethodology(Section4), reportsresults(Section5),discussesthem(Section6) andconcludes(Section7).
Agricultural price forecasting has moved from timeseriesmodelstomachinelearningandhybridmethods.ClassicalapproachesincludeexponentialsmoothingandARIMAfamilies(Hyndman&Athanasopoulos, 2021),andneuralandhybridstatistical–neuralmodels havebeenappliedtoIndianagriculturalpriceswith reportedgainsoverlinearbenchmarks(Jha&Sinha, 2014;Zhang,2003;Zhangetal.,1998).Manyofthese studiesevaluateoneorafewserieswithoutapersistencebenchmarkscoredunderthesamewalk-forward protocol,sothegeneralityofreportedgainsisunclear. Large forecasting competitions caution that statisticalandsimplemethodsareoftenhardtobeat,that gainsfrommachinelearningdependonseriescharacteristicsandcovariates,andthatcombinationsare robust(Makridakisetal.,2018,2020,2022;Petropoulos etal.,2022).Treeensemblesareparticularlycompetitiveontabularfeatures(Friedman,2001;Grinsztajn etal.,2022;Keetal.,2017),whichmotivatestheiruse here,withridgeregression(Hoerl&Kennard,1970)as alinearcontrast.
Theroleofweatheriswellestablishedforcropyields. Temperature extremes and rainfall deficits reduce yieldsinanonlinearway(Schlenker&Roberts,2009; Lobelletal.,2011),andweathershocksarewidelyused asexogenoussupplyshiftersinstudiesofagricultural supplyanddemand(Roberts&Schlenker,2013).The macroeconomicliteraturefindsthatweatherphenomenasuchasElNinoaffectcommodityandfoodprices, witheffectsthatvaryacrosscountriesandepisodes (Cashinetal.,2017).Translatingthesesupplyeffects into short-horizon price forecasts is less straightforward. Prices reflect stocks, trade, policy and expectations,sothepass-throughofweathertopricesmay beweak,delayedorregime-dependent.Inforecasting practice,weathervariablesoftenaddlittletoprice-only models,apatternconsistentwiththebroaderfinding thatpredictorswithstrongin-samplelinksfrequently failoutofsample(Goyal&Welch,2008;Stock&Watson,2003).Thepossibilitythatthevalueofapredictor isconcentratedinparticularregimes, andtherefore thataveragetestsunderstateit,isanaturalimplication ofinstabilityresearch(Giacomini&Rossi,2010;Rossi, 2013).
Asecondstrandconcernsdataquality.Weeklyagriculturalpriceseriesfrequentlycontainmissingobservations,repeatedvaluesfromunrecordedmarketdays andoutliers.State-spacemodelsandtheKalmanfilter (Kalman,1960;Harvey,1989;Durbin&Koopman,2012) areastandardtoolforfillinggapsandsmoothingnoise, andKalman-basedimputationiswidelyusedfortime serieswithmissingvalues(Moritz&Bartz-Beielstein, 2017). Whether smoothing or imputation improves forecasting is not obvious: a smoother can remove noisethatisirrelevanttopredictionbutcanalsoremoveinformation,andatwo-sidedsmoothercanleak futureinformationinto past valuesifapplied tothe fullsample. Thepresentstudykeepsthisdistinction explicit.
A third strand concerns how to evaluate and combineforecasts.Out-of-sampleevaluationmustrespect timeorder(Tashman,2000;Bergmeir&Benitez,2012; Cerqueiraetal.,2020),andequalpredictiveaccuracy istypicallytestedwiththeDiebold-Marianotestand itssmall-samplecorrection(Diebold&Mariano,1995; Harveyetal., 1997), withspecialcarewhenmodels arenested(Clark&McCracken,2001).Accuracyisusuallymeasuredbyabsoluteorsquarederrors,scaled for comparability (Hyndman & Koehler, 2006), but decision-makers also care about directional performanceandturningpoints(Pesaran&Timmermann, 1992;Granger&Pesaran,2000).Forecastcombination canshrinknoisyforecaststowardrobustbenchmarks, andfixed,equalweightsoftenoutperformestimated weightsbecauseofestimationerror(Smith&Wallis, 2009;Claeskensetal.,2016),apointthatmattersfor anyrulethatswitchesbetweenmodelsonthebasisof ashortwindowofperformance.
Takentogether, theliteraturesuggeststhatweather should matter for supply, that its marginal forecastingvaluemaynonethelessbesmallonaverageand concentratedinspecificregimes,andthataruletodetectthoseregimesfromrecentperformancefacesasevereestimationproblem.Nostudy,toourknowledge, hassetupthetestdirectly:price-onlyversusweatheraugmentedforecastsonasinglecleandataset,agate appliedtoboththemachine-learning-versus-naiveand theweather-versus-price-onlycomparisons,regimespecificevaluation,andacheckonwhetherKalmanfilledpricessubstituteforgating.Thispaperfillsthat gap.
Themaindatasetcontains1,080consecutiveweekly observations (dated on Sundays, from 12 January 2003to17September2023)ofpotatoprice,aKalmanprocessedprice,meantemperatureandprecipitation. Prices are used in the units supplied, which appear tobeascaledunitratherthanrupeesperquintal(a daily modal-price file supplied alongside, covering 2006–2023,hasweeklymeansabout8.7timeslarger, withacorrelationof0.78withtheweeklyseries),so resultsarereportedbothinsuppliedunitsand,forcomparability,relativetothenaiveforecast.Temperatureis takentobeindegreesCelsiusandprecipitationinmillimetresperweek.Thelocationoftheweatherstation andthemarketarenotdocumentedinthefilesand shouldbespecifiedbytheauthorbeforesubmission.
Rawpriceismissingin161weeks(14.9%),allbetween 2003and2011;from2012onwardtherawseriesiscomplete. TheKalmanpriceisidenticaltotherawprice wherevertherawpriceisobserved(thetwoseriesdiffer onlyinthe161missingweeks)andisthereforeagapfilledseriesratherthanasmoothedone.Twofurther datafeaturesmatter. First,thefilledvaluesinsome earlygapsareimplausiblylow(theminimumKalman priceis0.64,againstarawminimumof13.4),sothe imputationisimperfectintheearlyperiod. Second, about15%ofweeklypricesrepeatthepreviousweek’s value,whichsuggestscarried-forwardquotations.In addition,thefirstyearcontainsanisolatedspike(138 inMarch2003betweenvaluesof34and17). Itisnot knownwhethertheKalmanprocedurewasaone-sided filteroratwo-sidedsmootheroverthewholesample; ifthelatter,filledvaluesinsidegapscouldcontaininformationfromlaterobservations,alimitationdiscussed inSection6. AthirdfilewiththeKalmanpricealone runs to December 2023 and agrees exactly with the Kalmancolumnoverthe1,080overlappingweeks,but hasnoweatherdataforitsextraweeksandwasnot used.
Table1andFigure1summarisethedata. Pricesare stronglyright-skewed(skewness1.55forrawand1.64 for Kalman price) with a pronounced peak in 2020, whenthemaximumof438.8wasreachedinDecember. Precipitationishighlyskewed(skewness5.8)andzero Price(raw,observedweeks) 919 107.5 66.5 13.43 438.81 1.55 Price(Kalman) 1080 98.8 65.4 0.64 438.81 1.64 Temperature 1080 25.9 7.5 7.52 41.01 -0.22 Precipitation 1080 Note.Priceunitsassupplied.Therawpriceisobservedin919of1,080weeks;theKalmanprice,temperatureandprecipitation
in56%ofweeks,asexpectedforamonsoonclimate withalongdryseason,whiletemperaturehasastrong seasonalcycle.Annualrainfallvariesfrom47.8mmin 2020to244.1mmin2009. Definingdroughtyearsex postasfullcalendaryearsin2003-2022withannual rainfallatorbelowthefirstquartile(93.8mm)identifies 2005,2007,2014,2017and2020;only2014,2017and 2020fallintheevaluationperiodthatbeginsin2008. Contemporaneous correlations between weekly log pricechangesandweatherareclosetozero(0.03with temperature,0.03withprecipitationand-0.01with13 weekrainfall),afirstindicationthatanyweathersignal mustbesubtle.
Theforecasttargetisthelogpricechangeoverhorizonhweeks,lny(t+h)-lny(t),andthelevelforecastis
2.3 7.0 0.00 71.41 5.83
areavailableinall1,080weeks.
(t+h)=y(t)·exp().Horizonsofoneandfourweeksare studied.Forecastsareproducedbyexpanding-window walk-forwardevaluation: ateachorigin, modelsare trainedusingonlysampleswhosetargetswererealised bythatorigin,andarere-estimatedevery13origins. Thefirstoriginisweek208(aboutfouryearsoftraining),andtheevaluationwindowstartsonceafurther52 weeksplushhaveelapsed,sothatgatedandungated forecastsarescoredonidenticaltargets(713originsat h=1,703ath=4,coveringtargetsfromJanuary2008 andMarch2008toSeptember2023,respectively).Becausetherawpricehasgaps,onlyoriginsatwhichboth thecurrentandthetargetrawpriceswereobserved arescored,andthemodelsaretrainedonthesame typeofsample.ImputedKalmanvaluesaretherefore usedonlyasinputsandneverastargets,soallmodels areevaluatedagainstthesameobservedprices. Table 2 lists the forecasters. Model A is persistence, ˆy(t+h)=y(t).ModelBisaprice-onlylearner,eitherhistogram gradient-boosted trees (HGB; 120 iterations, learningrate0.05,depth3,minimumleafsize15,L2 penalty1;Friedman,2001;Keetal.,2017;Pedregosa etal., 2011)orridgeregression(penalty30; Hoerl& Kennard,1970).Itsfeaturesarelog-pricedifferencesln y(t-k)-lny(t)fork=1,2,3,4,8,13,26,52,thestandard deviationofrecentlogreturns,thegapsbetweenthe currentlogpriceandits13-weekand26-weekmeans, and sine and cosine terms of the week of the year. ModelCaddsweatherfeatures: temperatureatlags 1,2and4anditscurrentvalue,4-and13-weekmean temperature,precipitationatlags1and2,4-,13-and 26-weekprecipitationtotals, andarainfall-anomaly indexequaltothe26-weekprecipitationtotaldivided bythemeanofthesamequantityinthesameweekof earlieryears(computedfrompastdataonly,withat leastthreeprioryears). Eachlearnerisrunwithtwo inputs: therawpriceseries(gapscarriedforwardin thefeatureconstruction)andtheKalmanpriceseries. Aseasonalnaiveforecast(price52weeksbeforethe target)servesasaturning-pointbenchmark.Hyperparameterswerefixedbeforehandandnottunedonthe evaluationsample.
Aturningpointatanoriginisareversalinthedirection oftheh-stepchange:therealisedchangeoverthenext hweekshastheoppositesigntotheprecedingh-week change.Aforecastpredictsareversalwhenitsimplied changehastheoppositesigntotheprecedingchange, andturning-pointskillismeasuredbytheF1scoreof predictedagainstrealisedreversals.Persistencenever predictsareversal,soitsF1iszerobyconstructionand turning-pointskillisbenchmarkedagainstseasonal naiveforthecomparisonofBwithA,andagainstthe referencemodelitselfforthecomparisonofCwithB.
Theconfidencegatecomparesacandidatemodelwith areferenceusingonlyforecasterrorsthatwouldhave beenrealisedatthedecisiontime. Ateachoriginit takesthemostrecentWrealisedorigins(W=26inthe main analysis, with 13 and 52 as sensitivity checks) andrequires,first,thatthecandidate’smeanabsolute errorbelowerthanthereference’sand,second,that thecandidate’sreversalF1exceedthereferences.To requireconsistency,bothconditionsmustholdinthe fullwindowandinitsmorerecenthalf(minimumfour origins).Whenthegateisopenthecandidate’sforecast isused,andotherwisethereferences.Gate1applies thisruletoBagainstA,andGate2toCagainstB.A cascadeusesCwhenGate2isopen,BwhenonlyGate 1isopenandAotherwise.
AccuracyismeasuredbyMeanAbsoluteError(MAE) relativetothenaiveforecast,sothatvaluesbelowone favourthemodel,andbyreversalF1.PairwisecomparisonsusetheDiebold-MarianotestofequalabsoluteerrorlosswithaBartlettlong-runvarianceoflagh-1 andtheHarveyetal.(1997)small-samplecorrection (Diebold&Mariano,1995);apositivestatisticmeans thatthefirstforecastinacomparisonhasthelarger loss. Because the comparison of C with B involves nestedmodels,thetestsshouldbereadasdescriptive (Clark&McCracken,2001),andnomultiplicitycorrectionisapplied.
Threeanalysesassesswhetherweathermattersconditionallyandwhetherthegatedetectsit.First,accuracy ofCrelativetoBiscomputedseparatelyinweather regimesdefinedfromthepast-onlyrainfall-anomaly index(drywhenthe26-weekrainfalltotalisbelow70% ofitssame-seasonhistoricalmean,wetwhenabove 130%, normal otherwise) and by season (monsoon monthsJunetoSeptemberversusothermonths).Second,anex-postcomparisoncontrastsdroughtyears (2014,2017and2020intheevaluationsample)with other years. Third, gate quality is assessed by comparing the gate state with a forward-looking benchmark:weatherissaidtohelpatanoriginifChaslower meanabsoluteerrorthanBoverthenext13scored origins.Thisbenchmarkusesfutureinformationand isusedonlytoevaluatethegate,nevertomakeforecasts. Gatequalityissummarisedbyaccuracyofthe gatestateagainstthisbenchmark(comparedwiththe accuracyofanalways-closedgate),precision,recall andthecorrelationbetweenthegatestateandtherealisedbenefitofweather,andbytheratioofC’stoB’s MAEonoriginsatwhichthegateisopenandclosed. Ausefulgategivesaratiobelowonewhenopenand aboveonewhenclosed.
Table 3 gives the central accuracy comparison. Persistence is a demanding level benchmark: seasonal naivehasanMAE2.96timeslargeratoneweekand 2.41timeslargeratfourweeks(DMstatistics20.3and 12.6,bothp<0.001),sorepeatinglastyear’spriceis notaviablealternative.ThepersistenceMAEis26.44 ath=1and32.48ath=4inthesuppliedunits.Priceonlymachinelearningimprovesonpersistence,and theimprovementgrowswiththehorizon.Atoneweek therelativeMAEis0.961forHGBwithrawpricesand 0.934withKalmanprices,and0.981and0.982forridge, noneofwhichisstatisticallydistinguishablefrompersistence(Table4). Atfourweeksthegainsarelarger andclearlysignificantforeverylearnerandinput:relativeMAEof0.866(HGB,raw),0.855(HGB,Kalman), 0.898(ridge,raw)and0.893(ridge,Kalman),withDM Model Specification A.Naive Persistence:ˆy(t+h)=y(t).
B.Price-onlyML Histogramgradient-boostedtrees(HGB)orridgeregressiononprice-derivedfeaturesonly;rawpriceorKalman-priceinputs.
C.Price+weatherML ModelBfeaturespluslaggedtemperature,laggedprecipitation,rollingprecipitationandtemperaturesummariesandarainfall-anomalyindex. Gate1(BvsA) UseBonlywhenithasshownconsistentlevelandturning-pointimprovementovernaive;otherwiseuseA.
Gate2(CvsB) UseConlywhenithasshownconsistentlevelandturning-pointimprovementoverB;otherwise useB.
Cascade CifGate2isopen;otherwiseBifGate1isopen;otherwiseA.
statisticsbetween-3.79and4.31(p<0.001).Boosted treesareslightlymoreaccuratethanridgeregression atbothhorizons.
Addingweatherdoesnotimproveaccuracyonaverage. Forboostedtreeswithrawprices,relativeMAEmoves from0.961(B)to0.967(C)atoneweekandfrom0.866 to0.862atfourweeks; withKalmanpricesitmoves from0.934to0.924andfrom0.855to0.852.Noneof thesedifferencesisstatisticallysignificant(DMstatisticsforCversusBbetween-1.06and0.51,p 0.29;Table 4). Forridgeregressiontheweatherfeaturesworsen accuracy:relativeMAErisesfrom0.981to0.989atone weekandfrom0.898to0.915atfourweekswithraw prices, and the deterioration at four weeks is statisticallysignificant(DM=2.39,p=0.017;withKalman prices, DM = 1.82, p = 0.069). The overall picture is thatweatherfeaturesare,onaverage,neutralfortree ensemblesandmildlyharmfulforalinearmodel,in linewiththeviewthattheaveragemarginalvalueof weatherissmall.Turning-pointF1isalsounaffected: reversalF1ofthelearnersis0.62-0.63atoneweekand 0.70-0.74atfourweeksregardlessofwhetherweather isincluded,whichexceedsseasonalnaive(0.54and 0.60)butshouldbereadagainstthehighreversalfrequencyintheseweeklydata.
Table5showswhatthegatesdo.Gate2,whichchooses betweenCandB,isopenforonly5––21%oforigins, and its forecasts are almost indistinguishable from thoseofB:forboostedtreeswithrawpricesthegated relative MAE is 0.959 at one week and 0.861 at four Note.h=forecasthorizoninweeks.
weeks,comparedwith0.961and0.866forBand0.967 and0.862forC.Thegatethereforeneitheraddsnor removesvalue,whichiswhatoneexpectsifweather haslittletoaddandthegate,correctlyorbychance, mostlystaysclosed. Gate1,whichchoosesbetween BandA,behavesdifferently.Itisopenin33––39%of originsatoneweekand51––57%atfourweeks,andit iscostly:becauseBisreliablybetterthannaiveatfour weeks,switchingbacktonaivewhenevertherecent recordlooksunfavourablegivesupmuchofthegain. ForHGBwithrawpricesthefour-weekrelativeMAE risesfrom0.866(Balwayson)to0.932(Gate1),and withKalmanpricesfrom0.855to0.897; thepattern issimilarforridge(0.898to0.964and0.893to0.958). Thegatedforecastsstillbeatpersistencesignificantly atfourweeks(forexample,Gate1withrawHGB,DM =2.57,p=.010),buttheyareworsethantheungated price-onlymodel. Thecascade,whichincludesboth gates,issimilartoGate1(relativeMAE0.910atfour weeksforrawHGB).Atoneweeknoneofthegatedor cascadedforecastsissignificantlydifferentfrompersistence.
Table6addressesthecentralquestion,whetherGate2 openswhenweatherhelps.Itdoesnotdosoreliably. Foreverylearnerandinput,thecorrelationbetween thegatestateandtherealisedbenefitofweatherover thenext13originsliesbetween-0.03and0.09,whichis essentiallyzero.Theaccuracyofthegatestateagainst theforward-lookingbenchmarkrangesfrom0.45to 0.65,butthismustbecomparedwiththeaccuracyof simplyleavingthegateclosed,whichis1minusthe shareoforiginsatwhichweatherinfacthelps,andthe gaterarelybeatsthatbaselinebyameaningfulmargin (forexample,0.552against0.501forrawHGBatone week,and0.575against0.576forrawridge).Precision ismoderateinafewcases(0.70forrawHGBatone week)butrecallislow(0.06-0.19),sothegatemisses mostoftheoccasionsonwhichweatherlaterhelps. TheconditionalMAEratiostellasimilarstory:forraw HGBatoneweek,C’sMAErelativetoBis0.983when thegateisopenand1.010whenclosed,inthedirection Forecaster h=1 h=1 rel.MAE F1 A.Naive(persistence) 1.000 - Seasonalnaive 2.958 0.543 B.HGB,raw 0.961 0.631 B.HGB,Kalman 0.934 0.628 B.Ridge,raw 0.981 0.629 B.Ridge,Kalman 0.982 0.624 C.HGB,raw 0.967 0.624 C.HGB,Kalman 0.924 0.622 C.Ridge,raw 0.989 0.628 C.Ridge,Kalman 0.988 0.618 Note:RelativeMAE=MAEoftheforecasterdividedbyMAEofpersistence(A);valuesbelow1.000favourtheforecaster. PersistenceMAE=26.44(h=1)and32.48(h=4)insuppliedunits.F1=F1scoreofpredictedversusrealiseddirectionreversals; persistencepredictsnone,soitsF1iszerobyconstruction.B=price-only;C=price+weather.
Table 4. Diebold-MarianoStatisticsforAbsolute-ErrorLoss(p-valuesinparentheses) Comparison Learner/input h=1 h=4 BvsA HGB,raw -0.92(.357) -4.23(<.001) BvsA HGB,Kalman -1.49(.138) -4.31(<.001) BvsA Ridge,raw -0.50(.617) -3.79(<.001) BvsA Ridge,Kalman -0.44(.660) -3.92(<.001)
CvsB HGB,raw 0.51(.607) -0.38(.701) CvsB HGB,Kalman -1.06(.290) -0.29(.775) CvsB Ridge,raw 1.27(.205) 2.39(.017) CvsB Ridge,Kalman 1.17(.244) 1.82(.069) CvsA HGB,raw -0.78(.438) -4.02(<.001) CvsA HGB,Kalman -1.77(.078) -4.31(<.001) CvsA Ridge,raw -0.28(.776) -3.06(.002) CvsA Ridge,Kalman -0.28(.777) -3.30(.001) Note.Positivestatisticsindicatethatthefirstforecastinthecomparisonhasthelargerloss.A=naive;B=price-only;C=price+
ausefulgatewouldproduce,butthedifferenceissmall, andwithKalmanpricestheorderingreverses(1.036 open, 0.987closed). Insum, thegateisaweakand unstabledetectorofconditionalvalueinthesedata.
Figure3showsthatGate2opensinshort,scattered episodesthatdonotlineupsystematicallywithlowrainfallperiods,whileGate1isopenforlongstretches interruptedbyclosures.Table7asksdirectlywhether weatherhelpsmoreindryregimes.Forboostedtrees withrawprices,theratioofC’stoB’sMAEatfourweeks is0.980indryregimes,1.005innormalregimesand 1.025inwetregimes,andatoneweek0.991,0.992and 1.084,respectively.WithKalmanpricesatoneweekthe ratiosare0.967,1.004and1.024. Theordering,with weatherhelpingmostindryregimesandhurtingin wetregimes,isinlinewiththeconditional-valuehypothesis,butthemagnitudesaresmall(typically1-3%), theyarenotuniformacrosslearners(ridgeregression showsratiosaboveoneinnearlyeveryregime),and theyarenottestedhereforsignificance. Theseason splitgivesnoconsistentpatterneither: weatherfeatureshelpslightlyinthemonsoonatfourweeksforraw HGB(0.971)buthurtatoneweek(1.019).Gate2does behavesensiblyinthewetregime,whereweatherwas h=4 h=4 rel.MAE F1 1.000 - 2.407 0.602 0.866 0.715 0.855 0.728 0.898 0.709 0.893 0.725 0.862 0.725 0.852 0.735 0.915 0.701 0.906 0.711 weather.“Raw”and“Kalman”refertothepriceinput.
mostharmful:itsopenrateforrawHGBatoneweekis 2%inwetregimesagainst15-16%indryandnormal regimes(Table7b).Thatcorrectclosinginwetperiods istheclearestsignofanyregimesensitivityinthegate; itdoesnotextendtodryregimes,wherethegateopens nomoreoftenthaninnormalones.
The ex-post classification of years gives a sharper, thoughstilltentative,contrast. Inthethreedrought years inside the evaluation sample (2014, 2017 and 2020;157scoredweeks)theweathermodel’sMAEis 3.3%lowerthantheprice-onlymodel’satoneweek (ratio0.967),whereasintheremainingyearsitis2.6% higher(ratio1.026). Themeanabsolute-errordifferenceis-1.25indroughtyears(t=-1.36,p=0.176)and +0.57inotheryears(t=1.75,p=0.081),andthedifferencebetweenthetwogroupshasaWelchpof0.064. Atfourweeksthecontrastvanishes(ratios0.992and 0.997).Thisisthesingleresultmostsupportiveofthe title’s hypothesis. It is based on only three drought years,theclassificationisex-postandbasedonannual rainfall,andthedifferenceisnotsignificantatconventionallevels,soitshouldbetreatedasahypothesisfor furthertestingratherthanasafinding.
Table8comparesrawandKalman-filledinputs. For h Learner/in- B Gate1 C put 1 HGB,raw 0.961 0.991 0.967 0.959 0.961 0.34 0.13 HGB, 0.934 0.967 0.924 0.936 0.965 0.39 0.07 Kalman Ridge,raw 0.981 0.992 0.989 0.982 0.995 0.33 0.05 Ridge, 0.982 0.999 0.988 0.979 0.999 0.33 0.09 Kalman 4 HGB,raw 0.866 0.932 0.862 0.861 0.910 0.51 0.21 HGB, 0.855 0.897 0.852 0.856 0.891 0.57 0.19 Kalman Ridge,raw 0.898 0.964 0.915 0.896 0.961 0.52 0.07 Ridge, 0.893 0.958 0.906 0.892 0.948 0.53 0.08 Kalman Note.B=price-only;C=price+weather;Gate1=BgatedagainstA;Gate2=CgatedagainstB;Cascade=CifGate2open,else BifGate1open,elseA.W=26origins.Openratesaresharesoforiginsatwhichthegateisopen.
Table 6. Gate2Diagnostics:DoestheGateOpenWhenWeatherHelps? h Learner/in- Openrate MAE ratio MAE put (open) (closed) helps next racy closed 1 HGB,raw 0.13 0.983 1.010 0.50 0.55 0.50 0.03 HGB, 0.07 1.036 0.987 0.55 0.45 0.45 -0.03 Kalman
Ridge,raw 0.05 1.023 1.007 0.42 0.57 0.58 -0.02 Ridge, 0.09 0.965 1.010 0.39 0.61 0.61 0.08 Kalman 4 HGB,raw 0.21 0.976 1.001 0.46 0.50 0.54 0.04 HGB, 0.19 1.003 0.995 0.53 0.48 0.47 -0.01 Kalman Ridge,raw 0.07 0.966 1.024 0.32 0.65 0.68 0.09 Ridge, 0.08 0.985 1.018 0.35 0.62 0.65 0.05 Kalman Note.Openrate=shareoforiginsatwhichGate2(CagainstB)isopen.MAEratio=MAEofCdividedbyMAEofBonoriginsat whichthegateisopenorclosed.“Weatherhelpsnext13wks”=shareoforiginsatwhichChaslowerMAEthanBoverthenext 13scoredorigins(forward-looking,usedonlytoevaluatethegate).Gateaccuracy=shareoforiginsatwhichthegatestate agreeswiththisbenchmark;always-closedaccuracy=1minusthebenchmarkshare.Correlation=correlationbetweenthe
boostedtreesatoneweek, Kalman-filledinputsimproveaccuracymodestly:relativeMAEforBfallsfrom 0.961to0.934andforCfrom0.967to0.924,andthe latterdifferenceissignificant(DM=-2.69,p=0.007), whiletheformerisnot(p=0.119).Atfourweeksand forridgeregression,differencesaresmallandnotsignificant.Becausetherawpriceiscompletefrom2012 andthegapsliein2003-2011,thefilledseriesaffects thetrainingdataandtheearlypartoftheevaluation windowratherthanrecentforecasts,andthegainat oneweekfortreesisconsistentwithbetterlagfeatures duringgapperiods.Kalmanfillingdoesnotsubstitute forgating: itimprovesthelevelforecastsofCandB similarlybutleavesunchangedtheweakrelationship betweengatestateandthebenefitofweather(Table 6),andGate1remainscostlywithKalmaninputs.
Table9reportsrobustnesstothegatewindow.Gate2 remainsopenforonly5-26%oforiginswhateverthe window,anditsforecastsstaywithinabout0.6%ofB Gate2 Cascade Gate1open Gate2open ratio Weather Gate accu- Always- Correlation
13wks accuracy
gatestateandtherealisedbenefitofweather.
inallcases(relativeMAEtoBbetween0.994and1.004). Gate1stayscostlyatfourweeks(relativeMAEbetween 0.879and0.941against0.855-0.866foralwaysusing B),andlongerwindowshelpitonlyslightlybecauseB isgenuinelybetterthannaive.Theconclusionsdonot dependonthewindow.
Threeconclusionsemerge.First,price-onlymachine learningisgenuinelyusefulforfour-week-aheadpotato priceforecasting,reducingmeanabsoluteerrorby10- 15%relativetoano-changeforecastwithhighstatisticalconfidence,whileatoneweekthegainissmalland notsignificant.Thisdiffersfromthenear-parityofcomplexmodelsandpersistenceoftenseenatveryshort horizonsinvolatilemarketsandsuggeststhatpotato pricescarryexploitablemomentumandseasonalstructureattheone-monthhorizonthatgradient-boosted
Table 7. MAEofWeatherModelRelativetoPrice-OnlyModel,byRegime(C/B) h Learner/input Dry Normal 1 HGB,raw 0.991 0.992 HGB,Kalman 0.967 1.004 Ridge,raw 1.001 1.017 Ridge,Kalman 1.003 1.011
4 HGB,raw 0.980 1.005 HGB,Kalman 0.995 1.002 Ridge,raw 1.026 1.019 Ridge,Kalman 1.025 1.014 Note.Dry=26-weekrainfallbelow70%ofitssame-seasonhistoricalmean;wet=above130%;normalotherwise.Monsoon= June–September.Valuesbelow1meantheweathermodelismoreaccurate.Regimesusepastdataonly.
treescanextract.Second,weatherfeaturesdonotimproveaverageaccuracy.Thisisconsistentwithfindings thatpredictorswithasoundeconomicrationaleoften failtodeliverout-of-samplegains(Goyal&Welch,2008; Stock&Watson,2003),andwithaworldinwhichstor- Wet Monsoon Non-monsoon 1.084 1.019 1.001 1.024 0.978 0.995 1.011 1.019 1.003 1.009 1.014 1.004 1.025 0.971 1.006 0.993 0.987 1.002 1.000 1.018 1.020 0.989 1.016 1.015
ageandtradeabsorbmuchweathervariation,sothat weathermattersonlyinunusualepisodes.Thedeteriorationforridgeregressionisareminderthatadditional regressorshaveanestimationcost.
Third,andmostrelevanttothetitle,theevidencefor conditionalvalueissuggestivebutweak,andthegate doesnotdetectit. Weatherfeaturesweremostuseful in dry regimes and in the three drought years in theevaluationsample,andleastusefulorharmfulin wetregimesandinotheryears. ThegatebetweenC andBclosednearlycompletelyinwetregimes,where weatherdidharm,butopenednomoreoftenindry thannormalregimes,anditsstatewasuncorrelated withtherealisedbenefitofweatheroverthefollowing13origins.Thereasonsaretheonestheforecastcombinationliteratureanticipates.Agateisaforecast ofrelativeskill,andifthebenefitofweatherissmall Regime Weeks(h=1) Gate2openrate(HGB,raw) Gate2openrate(HGB,Kalman) dry 298 0.15 0.03 normal 274 0.16 0.12 wet 141 0.02 0.06 monsoon 245 0.14 0.07 non-monsoon 468 0.12 0.07 Note.Openrate=shareoforiginsintheregimeatwhichGate2isopen.Monsoonandnon-monsoonrowsclassifybyseason
Comparison Learner Rawrel.MAE Kalman rel. DM,Kalmanvs Rawrel.MAE Kalman rel. DM,Kalmanvs
B HGB 0.961 0.934 -1.56(.119) 0.866 0.855 -0.94(.350) C HGB 0.967 0.924 -2.69(.007) 0.862 0.852 -0.74(.457) B Ridge 0.981 0.982 0.06(.949) 0.898 0.893 -0.87(.383) C Ridge 0.989 0.988 -0.10(.923) 0.915 0.906 -1.43(.154) Note.RelativeMAEisrelativetothenaiveforecast.DMstatisticcomparestheKalman-inputforecastwiththeraw-input forecast(negativevaluesfavourKalman);p-valuesinparentheses.
(1-3%)relativetoforecast-errornoise,awindowof26 weeklyerrorscannotdistinguishitreliably(Smith& Wallis,2009;Claeskensetal.,2016).Droughtregimes arealsorareandslow-moving,soa26-weekwindowof realisedforecasterrors,whichbyconstructionlagsthe regime,maybeuninformativeaboutthenextweeks. Thesubstantiveimplicationisthatifweatherhasconditionalvalueinpotatoprices,extractingitprobably requiresaregimevariablebasedontheweatheritself, suchastherainfall-anomalyindex,ratherthanonrealisedforecastperformance.
TheB-versus-Agateillustratesthecostofagatewhen thecandidatemodelisgenuinelybetter. BecauseB beatsnaiveatfourweeksbyalargemargininnearlyall sub-periods,arulethatopensonlyafterrecentproof ofsuperiorityforgoesaccuracyatthetimesitisclosed, and itsclosuresare triggered by shortnoisy runsin whichBhappenedtolose.Thisisaplaindemonstrationthatswitchingrulesbasedonshortwindowsinheritestimationnoise,andthatforthisproblemthe fixedchoice(alwaysuseBatfourweeks)dominates thegate.
TheKalmancomparisonshowsthatgap-filledinputs canimproveforecastsfortreeensemblesatoneweek, buttheydonotreplacegating,becausetheychange theleveloftheforecastsratherthantheconditional valueofweather.Twocaveatsattachtothisresult.The earlypartofthesamplecontainsimperfectimputed values,andiftheKalmanserieswasproducedbyatwosidedsmootheroverthefullsample,filledvaluesmay embedfutureinformation,whichcouldfavourKalman inputs.Themodestgainsshouldthereforebereadas anupperboundpendingverificationofhowtheseries wasconstructed.
Several limitations apply. The study covers a single ratherthanbyrainfall.
Table 8. RawversusKalman-FilledPriceInputs MAE raw(h=1) MAE raw(h=4) potatoserieswithasingleweatherstationofunspeci- fiedlocation,andpricesinascaledunit;resultsmay differacrossmarkets. Onlytwolearnersandoneset of fixed hyperparameters were used, and no other
exogenous variables, such as arrivals, cold-storage stocks, area sown, import-export policy or fertiliser prices,wereincluded.Weatherwasmeasuredbysimple lags and rolling summaries rather than by cropstage-specificoragro-meteorologicalindices(forexample,heatstressduringtuberbulking).Thedrought-year contrastrestsonthreeyears,theregimethresholds(0.7 and1.3)areconventionalratherthanestimated,and thetestsarenotadjustedformultiplecomparisonsor forthenestedstructureoftheC-versus-Bcomparison. Finally,agatedefinedbyadualcriteriononshortwindows is one of many possible designs; smoother or probabilisticgating,orgatingontheweatherregime itself,mightdobetter.
This paper recast the question of whether weather helpspotatopriceforecastingasaquestionaboutconditionalvalueanditsdetectability. On1,080weekly observationsandabout15yearsofwalk-forwardforecasts,price-onlymachinelearningclearlybeatanochangeforecastatfourweeks(relativeMAE0.85-0.90) andweaklyatoneweek,whereasaddinglaggedtemperatureandprecipitationdidnotimproveaccuracy onaverageandworsenedalinearmodel.Weatherappearedtohelpindryregimesandinthethreedrought yearsinthesampleandtohurtinwetregimes,inthe directionpredictedbythehypothesisthatweathermattersmainlyindrought,buttheevidencewassmallin magnitudeandstatisticallyweak. Aconfidencegate builtonrecentlevelandturning-pointperformance did not detect these regimes: the C-versus-B gate Design Gate1rel.toA Gate1open Gate2rel.toB Gate2open Gate1rel.toA Gate2rel.toB Gate 2 open (raw) (raw) h=1,W=13 1.005 0.27 1.003 0.10 0.997 1.001 0.05 h=1,W=26 0.991 0.34 0.998 0.13 0.967 1.001 0.07 h=1,W=52 0.993 0.41 0.996 0.15 0.959 1.004 0.10 h=4,W=13 0.939 0.34 0.996 0.12 0.941 1.001 0.11 h=4,W=26 0.932 0.51 0.994 0.21 0.897 1.001 0.19 h=4,W=52 0.904 0.69 1.002 0.26 0.879 0.995 0.22 Note.Gate1relativeMAEisrelativetonaive;Gate2relativeMAEisrelativetotheprice-onlymodelB.W=numberofrealised
stayedmostlyclosedandwasnobetterthanchance at identifying when weather would help, and the Bversus-Agatereducedaccuracyrelativetosimplyusing theprice-onlymodel.Kalman-filledpricesimproved boosted-treeforecastsatoneweekmodestlybutdid notsubstituteforgating.
Forpractice,theresultssuggestthatanalystsshould firstestablishthegainfromprice-onlymachinelearning over a naive benchmark, treat weather features asoptionalandtestthemagainstaprice-onlymodel withinregimesratherthanonaverage,and,ifconditionalvalueissuspected,buildtheregimeindicator fromweatherdatadirectlyratherthaninferitfroma shortrecordofforecasterrors.Anullresultforthegate is not a failure of the question: it shows that conditionalvalue,ifpresent,istoosmallortooslow-moving tobepickedupfromrealisedforecastperformanceon a26-weekwindow.Futureworkshouldrepeattheexperimentacrossmarketsandcrops,includecrop-stage weatherindicesandmarketcovariates,testregimeeffectsformallywithconditionalpredictiveabilitytests, andverifywhethertheKalmanserieswasfilteredor smoothed.