Definition of Terms: Gross-Gross :: The gross amount The Orchard receives, without regard for supply chain distribution Gross-Net :: The gross amount The Orchard receives, net of supply chain. GPU :: Gross Per Unit. The gross-gross amount per paid unit of stream or download Group :: .... Notes: * All amounts are in USD unless otherwise stated. Currency conversion is handled by Orchard Engineering. See below for conversion information. * In all data calculations involving monthly statistics, for iTunes the "month" in analytics is adjusted to iTunes unique 5-4-4 accounting. eg. Transactions that occurred on March 2nd, 2014 are tagged as "February 2014" Forecast Overview Three Parts: (1) Calculate GPU (2) Create BI Tables (3) Run Forecast GPU Calculation --------------- * Aggregate from OA Accounting, sales and gross BY: Month, Store, TransactionType ** Any reference to "by group" means by the above stated breakdowns * GPU = Total Gross / Total Units by group * We disregard any groups wih $0 gross. (Generally, this is just one group, "itunes - Upgraded Download Albums - June 2013") This gives us the GPU until the last accounting date. Append one new month after accounting date. (Eg, currently, as of 2014-10-15, accounting goes until 2014-07-01, so we append 2014-08-01) (This is DT.storeavg2) For each group, create two forecats: GPU (1) A simple 3-month MA (2) An ARIMA model with seasonal component These are each created iteratively, starting from the most historic date to the most recent Append future dates to GPU table. Push the forecasts values down one row, to line up with the nex month Calculate the simple error for each model Use the last 4 months to measure error ....... (2) Currency Conversion (3) Forecast The amount of revenue per bucket is found by selecting the dollars with the corresponding tag(s) Old Method: Split each Dollar into percentages New Method: Each Dollar is “tagged”, much like our content is tagged. GPU: Looking back over 24 months, from sales calculate gpu by month, store, transac forecast said GPU from analytics - take into acount itunes544 ....... forecast from bi.accounting take gross, units from bi.analytics take gross, units, paidunits, freeunits, gest, gest_net_of_SC, gest_net_of_SC_no_rd ## RECALL: gest is the following ---------------------------------------------------- gest_no_rd = GG.gpu_using * AA.paidunits gest = if (is_royaltydollar_zero) GG.gpu_using * AA.paidunits else royaltydollar_times_paidunits SET gest = royaltydollar_times_paidunits WHERE (NOT is_royaltydollar_zero) -- FILTER BY paidunits_expected_ratio != 1 -- THEN MULTIPLY gest := gest * paidunits_expected_ratio UPDATE bi.aggregated_analytics SET gest = gest * paidunits_expected_ratio , gest_no_rd = gest_no_rd * paidunits_expected_ratio WHERE (paidunits_expected_ratio != 1) ; ---------------------------------------------------- tmp_DT.split_percs.acc <- DT.acc[, list(OA_gross_forDSOM = sum(gross)), keyby=kCols.splitgroup] tmp_DT.split_percs.anal <- DT.anal[date %ni% unique(tmp_DT.split_percs.acc$date), list(OA_gross_forDSOM = sum(gest, na.rm=TRUE)), keyby=kCols.splitgroup] DT.split_percs.unexpanded <- rbind(tmp_DT.split_percs.acc, tmp_DT.split_percs.anal) [date >= minDateToKeep] Calculate the split percentages OA_gross_forDSOM := sum(gross) when DS is in DT.acc, otherwise summ(gest) when DS is in DT.anal DT.split_percs.unexpanded ========================================================= ## Only include stores whose last date in GL is the lastDateClosed (ie, stores we're still working with), and ignore dates beyond lastDateClosed (they will be NA) tmp_DT.GL_gross_forDS <- DT.merged[(date <= lastDateClosed) & (GL_lastDate_forS == lastDateClosed), list(GL_gross_forDS = GL_gross_forDS[[1]]), keyby=kCols.datestore] ## -------------------------------------------------- ## ## RUN FORECAST FUNCTION ## -------------------------------------------------- ## cat("Beginning forecast ... ") DT.GL_forecasted <- forecastByDateStore(tmp_DT.GL_gross_forDS, datesToForecast=dates_not_in_GL, byCols=kCols.datestore) cat(" done.\n") ## -------------------------------------------------- ## DT.forecasts <- DT.merged[!is.na(forecasted_value), .SD, .SDcols=unique(c(kCols.smry, forecastColsToBringIn, "margin", "OA_percof_DS_forDSOM"))] ------------------ [DEFINE: Group] The forecast value is computed on a store-by-store basis. [How Calculated?] Each Group''s value is computed by multiplying the store value by the group''s respecitve precentage [How Calculated?] DT.ancillary_with_forecasts <- rbind(DT.ancillary_from_rev_summary, DT.forecasts_manual_from_rev_summary, use.names=TRUE, fill=TRUE) DT.forecast.full is the rbind of DT.forecasts and DT.ancillary_with_forecasts We clean up the buckets for DT.forecast.full Company Overview Forecast is ...