From dfce352f9f2a3734f6d0795b518f7daafc1b6424 Mon Sep 17 00:00:00 2001 From: bel Date: Fri, 27 Oct 2023 08:30:25 -0600 Subject: [PATCH] todo --- ana/predictor.go | 6 ++++++ todo.yaml | 21 +++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ana/predictor.go b/ana/predictor.go index bec9e5c..34617a8 100644 --- a/ana/predictor.go +++ b/ana/predictor.go @@ -1,6 +1,7 @@ package ana import ( + "log" "maps" "math" "regexp" @@ -43,6 +44,11 @@ func NewContributionPredictor(reg ledger.Register) Predictor { } func newContributionPredictor(monthlyRate map[string]ledger.Balance) Predictor { + for name, balance := range monthlyRate { + for curr, v := range balance { + log.Printf("%s/%s gains %.2f per month", name, curr, v) + } + } return func(given ledger.Balances, delta time.Duration) ledger.Balances { month := time.Hour * 24 * 365 / 12 months := float64(delta) / float64(month) diff --git a/todo.yaml b/todo.yaml index ff0c4ae..63bc201 100755 --- a/todo.yaml +++ b/todo.yaml @@ -1,13 +1,11 @@ todo: -- cmd to ana - ana/legacy_* drop - ana/predictor for bpi or de-legacy -- ana/prediction from ana/predictors w/ combo tests -- ana/predictor.go better than plain average -- http://localhost:8080/bal?likeName=AssetAccount:Cash&chart=stack&predictionMonths=120&predictCompoundingInterest=AssetAccount:Cash=0.02&predictFixedGrowth=VBTLX=0.03&predictFixedGrowth=FSPSX=0.03&predictFixedGrowth=GLD=0.01&bpi=true&predictContributions=true&zoomStart=1023-10&predictWhatIf=2023-10=AssetAccount:Cash=$=-7000 - changes too much when removing 7k from prinicple +- ana/predictor.go contributions better than plain average +- predictWhatIf=2023-10=AssetAccount:Cash=$=-7000 changes too much when removing 7k + from prinicple +- ana whatIf - predictions to LINE -- html version has fields and submit button rather than query params by hand - html version can accept new transactions for moolah scheduled: [] done: @@ -41,3 +39,14 @@ done: 1, next .16 weight 2, rest weight 4; inverse of span and cares more about recent; when ?predict ts: Thu Oct 26 08:02:51 MDT 2023 +- todo: cmd to ana + ts: Fri Oct 27 08:30:22 MDT 2023 +- todo: ana/prediction from ana/predictors w/ combo tests + ts: Fri Oct 27 08:30:22 MDT 2023 +- todo: ana/predictor.go better than plain average + ts: Fri Oct 27 08:30:22 MDT 2023 +- todo: http://localhost:8080/bal?likeName=AssetAccount:Cash&chart=stack&predictionMonths=120&predictCompoundingInterest=AssetAccount:Cash=0.02&predictFixedGrowth=VBTLX=0.03&predictFixedGrowth=FSPSX=0.03&predictFixedGrowth=GLD=0.01&bpi=true&predictContributions=true&zoomStart=1023-10&predictWhatIf=2023-10=AssetAccount:Cash=$=-7000 + changes too much when removing 7k from prinicple + ts: Fri Oct 27 08:30:22 MDT 2023 +- todo: html version has fields and submit button rather than query params by hand + ts: Fri Oct 27 08:30:22 MDT 2023