Mask a Trade Blotter Before Sharing a Backtest: Accounts, Counterparties and Sizes
A trade blotter shows more than prices: account ids, brokers, sizes and timestamps can reveal a client or a strategy. Here is how to mask a blotter so you can send it to a vendor, a consultant or a support ticket.
Why mask a blotter before sharing
You may need to share trades to debug a backtest, show a vendor a data problem, or ask for help on a forum. The file usually holds an account id, a counterparty, quantities and exact times. Each one can identify a client or give away how you trade. Masking replaces the identifying columns and keeps the rest, so the person helping you sees the problem and not the client.
Get a practice blotter
Open the Data Generator, choose Finance & insurance and pick Trade blotter. You get a trade id, date, a fictional ticker, side (Buy or Sell), quantity, price, currency, counterparty, account id, strategy and fees. Everything is random, so you can practise on it freely.
Choose a method for each column
Open the file in Data Masking and set a method per column. The account id suits Hash (SHA-256) with a salt: the same account always gets the same code, so per-account totals and joins still work, and the real id is not shown. The counterparty suits Replace with fake data (company), which is also consistent, so one broker always maps to the same fake name. Keep the symbol, side, price and fees if the other person needs them to reproduce the issue.
Quantity is the hard one. If size would identify the client, add noise (for example plus or minus 5 percent) or round it to the nearest 100. Dates can stay exact, or you can keep only the month.
What changes in your results
Hashing and fake names change nothing in the numbers, so P&L, turnover and fill statistics stay identical. Noise and rounding do change them, so use them only when exact results are not needed. After noise, rebuild notional with a Calculated column in Data Transformation (quantity times price), and say clearly in your message that the sizes were altered.
Check before you send
Run the masked file through the PII detector and search it for a few real account ids and broker names. Confirm that the same input gave the same output across all your files, which needs the same salt each time. Masking in the browser means the blotter is not uploaded anywhere while you do this.
What masking does not hide
Masking cannot hide your edge. A pattern of entry times and sizes can still say a lot about a strategy, even with every name replaced, so share the smallest slice you need. Follow your firm's data policy and ask compliance before sending client or trading data outside the company. For the general method, see test data masking. This is not compliance advice.
Related tool pages
- Test Data Masking: Test data masking in your browser: hide emails, phones, names and card numbers in a production export and keep formats and joins. Free, no upload.
- GDPR Test Data Generator: GDPR test data without real people: generate synthetic rows that follow the patterns of your own file, in your browser. Not legal advice.
- Mask Emails in a CSV File: Hide email addresses and phone numbers in a CSV file before you share it. Detects personal columns for you. Free, in your browser.
- Anonymize CSV Data: Anonymize a CSV before sharing it: hide names, emails, phones and card numbers with the method you choose. Free, in your browser.
- Mask PII in Excel Files: Find and hide personal data in an Excel file before you share it, such as emails, phone numbers and names. Free, in your browser.
- Mask Phone Numbers in a CSV: Hide phone numbers in a CSV, Excel or JSON file before you share it. Keep the country code or last digits, or replace with fake numbers. Runs in your browser.
Also try
- Test data masking
- Data quality checks before a backtest
- Data lineage for finance audit reports
- Data Transformation
How to use the Data Masking: step by step
- Open the trade file in Data Masking.
- Hash the account id and replace counterparty names with fake ones.
- Add noise or rounding to quantity only if size is sensitive.
- Preview, check for leftover real values, and download.
When to use the Data Masking
- Send a blotter to a vendor to debug an import
- Share a backtest sample on a forum or support ticket
- Give a consultant trade data without client names
- Keep per-account results while hiding account ids
Example
Input: ada@example.com, +1 555 0100
Output: a**@example.com, +1 *** ****
Frequently asked questions
Does hashing account ids keep my per-account results?
Yes. The same account id always becomes the same code when you use the same salt, so grouping, joins and per-account totals give the same answers.
Does adding noise to quantity change my backtest?
Yes. Noise changes notional and P&L, so use it only when the other person does not need exact results, and tell them the sizes were changed.
Is a masked blotter anonymous?
Not necessarily. Timing and size patterns can still point to a client or strategy, so share only what is needed and check your firm's policy.
Tip: Use one salt for every file you mask. If you change it, the same account gets a different code and your files will no longer join.