Thinking global, living local

How to use BazaarTalks: a multi-market quant research platform you can query with DuckDB

October 19, 2026

BazaarTalks (README title: Global Market Scanners) is a research platform for multi-market equity screening, point-in-time backtests and factor research, with a DuckDB warehouse, optional Cassandra and Kafka backbone, and a small FastAPI dashboard. Not investment advice.

Open-Source Tools · How-To · Markets research

How to use BazaarTalks: a multi-market quant research platform you can query with DuckDB

Skip to article content
Text Size

Revised · v1.0.0 · what changed

119unit tests passed offline
25market x screen pairs in the net-of-cost table
8of those still viable after costs (21-day)
19markets in the DVM scoring layer, per the README

Code: github.com/herrrickshaw/BazaarTalks

Watch the walkthrough

Watch on YouTube: youtu.be/lSpxxntKqZE

Why it is useful

  • Who benefits: independent quant researchers and students who want ready-made scanners, a lookahead-free backtest engine and cost-aware screen testing in one codebase.
  • What it replaces: stitching together separate scanners, cost models and factor notebooks; the repo has about 50 modules, documented in one README table.
  • Evidence from the run: the repo's unit tests ran offline in a fresh virtual environment and passed (119 tests in 14 seconds).
  • Evidence from the run: DuckDB queried the committed net-of-cost screen results directly, showing that only 8 of 25 market-screen pairs stayed positive after costs at the 21-day horizon.

What it is for

BazaarTalks bundles several things: full-universe scanners for five regions (Darvas, Piotroski, Coffee-Can) that write Excel workbooks; a point-in-time US backtest using SEC EDGAR filing dates; screen testing net of transaction costs; factor research (quality, post-earnings drift, liquidity); and a Durability, Valuation and Momentum scoring layer across many markets.

Results live in a DuckDB warehouse over Parquet files, with an optional Cassandra cache and Kafka streaming path, and a read-only FastAPI service plus an SVG dashboard.

This demo kept to what runs cheaply and offline: the unit tests and DuckDB queries over the committed result tables. I did not run the scanners (they call market-data APIs), the Cassandra and Kafka backbone, or the dashboard, which needs a built warehouse that is not in the repo.

The repo also contains code for logging in to paid data services with your own account. Those sessions are not used here, and the data they fetch should not be redistributed.

Who it is for

  • Quant students and independent researchers who want a transparent, testable codebase
  • Developers who want a template for a Parquet plus DuckDB research warehouse
  • Readers who want cost-aware, point-in-time method notes (PIT_BACKTEST_RESULTS.md, NET_OF_COST.md)
Not for.
  • Investment advice or trading signals. Not investment advice.
  • A one-command install: it lists heavy and optional dependencies (Cassandra, Kafka, Flink, Playwright)
  • Redistributing vendor data fetched through the optional paid-account sessions

What you need

RequirementWhyHow to get it
Python 3 and a virtual environmenteverything is Pythonpython3 -m venv .venv
pandas, numpy, duckdb, scikit-learn, scipy, pytestenough for the unit tests and the DuckDB queries shown herepip install pandas numpy duckdb scikit-learn scipy openpyxl yfinance pytest
Full requirements.txtadds Cassandra driver, Kafka client, PyFlink, Playwright and otherspip install -r requirements.txt (not done in this demo)
Network access to market data sourcesscanners and live pipeline stages fetch data; some sources rate-limitnot used in this demo
A built warehouseserve.py and the dashboard read it; the repo's .db files are empty stubs and the India Parquet is an LFS pointerrun pipeline.py --all <market> (not run)

Get the code and an AI assistant

You do not have to be a programmer. Get the repository, give it to an AI assistant, and ask in plain language. Any of these routes works:

ToolWhat you needBest for
GitHubFree account to fork or star; git to clone, or the green Code button, then Download ZIP, or open in CodespacesGetting the code and keeping up with updates
Claude CodeClaude subscription or API key; run claude inside the cloned folderLetting the AI read and run the whole repo
Gemini CLIGoogle account; run gemini inside the cloned folderThe same hands-on workflow with Gemini
Claude.ai, Gemini or ChatGPT in the browserA chat account; upload README.md and the files you care about (or paste the output of git ls-files)Understanding the project and asking questions without installing anything
Other tools (Copilot Chat, Cursor, Codex CLI)Open the cloned folder in the tool and point it at README.md firstEditing and extending the code
git clone https://github.com/herrrickshaw/BazaarTalks.git
cd BazaarTalks
claude      # or: gemini

Install

  1. Clone the repo and install a light subset into a virtual environment.
    git clone https://github.com/herrrickshaw/BazaarTalks.git
    cd BazaarTalks
    python3 -m venv .venv && source .venv/bin/activate
    pip install pandas numpy duckdb scikit-learn scipy openpyxl yfinance pytest

Quick start: commands and what you should see

Run the offline unit tests.

pytest -q

In the 19 October 2026 run: 119 passed in about 14 seconds, no network or Cassandra needed.

Query the net-of-cost screen results with DuckDB.

python3 -c "import duckdb; duckdb.sql(\"select market, count(*) screens, sum((net_viable='YES')::int) viable, round(avg(net_edge),2) avg_net_edge from 'net_viability_21d.csv' group by 1 order by 4 desc\").show()"

A five-row table by market (see sample outputs).

Run a scanner (needs network).

python full_indian_market_scan.py --top 200

Not run in this demo; it writes a styled Excel workbook.

Sample outputs

Real output from a run on the date shown in the sources line; trimmed to fit.

Screens that stay positive after costs, by market (21-day horizon, committed results)

duckdb over net_viability_21d.csv
market   screens  viable  avg_net_edge
Europe         5       3          0.68
Japan          5       2         -0.54
India          5       1         -0.57
US             5       2         -0.96
Korea          5       0         -2.08

Edge is in percent over 21 days after the repo's assumed round-trip costs; 8 of 25 market-screen pairs are net viable.

Top net-viable screens

order by net_edge desc limit 5
market  screen              gross_edge  cost%  net_edge  hit%
Europe  price_vol_breakout      3.8501    0.4     3.45   64.1
Europe  rsi_oversold            2.0168    0.4    1.617   65.2
US      rsi_oversold            1.0141    0.1    0.914   55.6
Japan   rsi_oversold            0.977     0.2    0.777   57.8
Europe  golden_crossover        0.8135    0.4    0.414   59.1

Costs are order-of-magnitude retail assumptions per the code; the repo says to edit COSTS_BPS to match your broker.

Point-in-time US backtest summary (from PIT_BACKTEST_RESULTS.md, committed, not re-run)

arm  rule                         ann_return%  Sharpe  max_dd%
A    Darvas breakout                  15.33     0.96   -15.4
B    Darvas + F-score >= 7            21.06     0.79   -31.5
C    Darvas + F>=7 + Coffee-Can       11.17     0.58   -19.6
BENCH equal-weight universe           13.85     0.93   -20.9

The doc itself warns of survivorship bias (current large caps) and unequal sample months (50, 44, 19). Read it as method illustration, not a result to trade on.

Ways to use it

MethodHow it works
Read the docsUSER_GUIDE.md, ARCHITECTURE.md and the per-topic notes explain each module.
Run the testspytest -q checks calendars, cost model, PIT filtering, features and scoring offline.
Query results with DuckDBCommitted CSVs and Parquet files can be queried directly with SQL.
Run scanners and pipeline.pyWith network access, build a warehouse and open the dashboard or serve.py API.
Via an AI assistantAsk an assistant to map the modules to your question before you run anything.

Sample prompts for your AI assistant

Copy, paste and edit the parts in [brackets].

  • Read README.md and USER_GUIDE.md and explain, in one table, which modules I need to screen the US market and which need Cassandra or Kafka.
  • Using net_viability_21d.csv and NET_OF_COST.md, explain which screens survive costs and why Korea shows none.
  • Walk me through how pit_fundamentals.py avoids lookahead using SEC EDGAR filing dates.
  • List the caveats in PIT_BACKTEST_RESULTS.md and explain which ones would change the arm B versus arm A comparison.
  • Show me how to write a DuckDB query that joins DVM scores to fundamentals, and explain the allow-list in serve.py that prevents SQL injection.
  • Which parts of this repo need paid data-service accounts, and what should I avoid committing or redistributing?

Limits and honest caveats

  • Not investment advice. Research code; results are historical and net of assumed, not real, costs.
  • Scanners, the live pipeline, Cassandra, Kafka, the dashboard and serve.py were not run (need network, services or a built warehouse). Only unit tests and DuckDB queries over committed CSVs ran, on 19 October 2026.
  • The repo's .db files are 8 KB empty stubs and cache_seed_local/cleaned_long_IN.parquet is a Git LFS pointer, so the warehouse must be built locally.
  • PIT_BACKTEST_RESULTS.md notes survivorship bias and uneven sample months; its Coffee-Can arm fired in only 19 of 56 months.
  • The README title and Colab link say global-market-scanners, so names differ from the repo name.
  • requirements.txt is long and pins heavy optional packages; install only what you need.

Sources: README, docs, tests and committed result tables in github.com/herrrickshaw/BazaarTalks; tests and DuckDB queries run on 19 October 2026 in a throwaway virtual environment. Only derived aggregates shown; no vendor data.

Revision history.
  • v1.0.0 — 21 October 2026 — first published.

About this article: Researched, written and edited by Umashankar Triplicane Dwarakanathan, with AI research assistance; every figure is meant to trace to the primary source cited. See the Editorial Policy for how sourcing, AI use and corrections work.

Umashankar Triplicane Dwarakanathan
Contact Us
Umashankar Triplicane Dwarakanathan
Investment Promotion & Energy-Sector Leader · Chennai, Tamil Nadu, India
LinkedIn → GitHub → Email +91 78273 81696
How this site works

Data-led analysis of India's trade, currency and industrial policy. Every article is built from primary official sources, and every figure links back to the release, table or filing it came from.

Sources. DGCI&S TradeStat (imports/exports, HSN-wise) · PIB (government press releases, January 2017 to today, refreshed daily) · RBI (circulars, balance of payments) · MoSPI (CPI/WPI, IIP) · PARIVESH (environmental clearances) · CCIL (bond yields) · BIS (policy rates) · SEBI, NSE/BSE and SEC filings for company data.

Interpretation. Figures carry their vintage and retrieval date; estimates and press-reported numbers are labelled as such; where sources disagree, both are shown. Corrections are made visibly, never silently. Articles are written with AI assistance from the cited sources — AI-generated text can misstate figures even when working from real material, so verify any number that matters to a decision against the linked primary source.

footer

Browse all articles by topic

Every piece on this blog, grouped. Or read the full index.

Agriculture & FertilisersAI ToolsChemicalsClimate & CarbonEnergy & FuelsGas & LNGImport SubstitutionIndustrial PolicyMarkets & FinanceMobility & EVPrices & InflationTextilesTrade & Tariffs

Each topic is a live archive page that updates itself as pieces are labelled. It replaces a hand-kept list that had fallen 18 articles behind.