# P\&Sing

**P\&Sing**, also known as **PNS-ing** or **trade compression**, is a process that FCMs run nightly. Its objectives are to, among other things:

* Reduce the number of line items that must be valued daily
* Provide a realized P\&L daily, even before traded contracts expire.

Molecule can mimic P\&Sing so that its realized number matches that from your FCM.

#### How P\&Sing works (at your bank)

P\&Sing essentially closes out positions for offsetting trades on exchanges. So, if you start the day with `+5 December NYMEX NG` and then make a trade for `-4 December NYMEX NG`, the FCM will show you only one line item on today's ending statement, for `+1 December NYMEX NG`.

#### Logic

Typically, P\&Sing logic goes as follows:

* Match within today's trades first, highest price to lowest price.
* Match with previous trades on a first-in, first-out basis.

#### Bank-Level Options

At your FCM, you typically have two options:

* **P\&S**: perform P\&Sing daily, closing positions that can be closed
* **Wait-and-instruct**: leave all positions open until expiry, unless you instruct otherwise.

#### P\&Sing in Molecule

Molecule can mimic one or both of these scenarios:

* **Wait-and-instruct**: this is Molecule's default state. All trades will revalue until their Settlement Date. You may manually match trades together (via the Legs screen) to close out positions, and Molecule will suggest positions to close out.
* **P\&S**: Molecule mimics your FCM's P\&Sing logic and auto-matches trades together.
* **P\&S with Shadow Entries**: Molecule does both. It P\&Ses, and also produces Valuation rows with `status = 'shadow'` that act as if P\&Sing never happened, and trades are all held to expiry.

#### Turning it On

Contact Molecule's CS team to turn this feature on. Note that while it's a simple checkbox to do so, our CS team typically enables P\&Sing for existing customers as a project. This is for two reasons:

* Enabling the feature is a destructive action -- it will realize eligible trades in your portfolio when it's turned on.
* P\&Sing logic may differ by bank. Most follow the above method, but your FCM (or even your setup at your FCM) may have variations. If your bank has a variation, we want to find it (and make a code change) before turning the feature on.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.molecule.io/core-functionality/core-features/specialized-features/p-and-sing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
