Skip to content

Fix: persist PSI indices after building them - #4

Open
mpont91 wants to merge 1 commit into
ent0n29:mainfrom
mpont91:fix/persist-psi-indices
Open

Fix: persist PSI indices after building them#4
mpont91 wants to merge 1 commit into
ent0n29:mainfrom
mpont91:fix/persist-psi-indices

Conversation

@mpont91

@mpont91 mpont91 commented Aug 25, 2026

Copy link
Copy Markdown

run_psi_index_building() in run_all.py calls builder.build_index() but never builder.save_index(), which exists in psi_index.py. The indices are built in memory, logged, and dropped.

As a result polybot.aware_psi_index stays empty, and the strategy service logs this every second without ever copying a trade:

FundTradeListener : No constituents found for index: PSI-10. Check aware_psi_index table.

Empty indices are skipped so a build that finds no eligible traders does not wipe a previously good index (save_index deletes before inserting).

Verified locally: truncated the table, ran the job, and it repopulated on its own (102 rows across 6 indices). The mirror funds then started copying — 116 paper orders across PSI-10, PSI-25, PSI-ALPHA and PSI-SPORTS.

run_psi_index_building() called build_index() but never save_index(), so
aware_psi_index stayed empty. The Java fund services found no constituents
and the mirror funds copied nothing.

Empty indices are skipped so a failed build doesn't wipe a good one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant