# Trade Log

Right below the [Holdings](https://guides.smolcompute.xyz/1/smol_tracker/holdings) table is the **Trade Log.** &#x20;

{% hint style="info" %}
You only need to enter data in the *first section* of the Trade Log. The  Stats and P\&L sections will self-populate to reflect the trade you just entered.&#x20;
{% endhint %}

<figure><img src="https://1714922137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl25uds0OJbgRcq45kX3M%2Fuploads%2FlwlpWLGpukno008n1kSI%2Fsmolcompute%202024-06-04%20at%2016.25.03.png?alt=media&#x26;token=91cc753e-c4a6-4810-922b-dbe734e21c54" alt="Portfolio Tracker – Premium Templates for Apple Numbers."><figcaption><p>The Trade Log</p></figcaption></figure>

The Trade Log is composed of 4 sections:&#x20;

* The first section is where you enter your trades (lighter cells).
* &#x20;The second section automatically displays useful updated stats about your holdings, reflecting the trade you just added to your Trade Log.&#x20;
* The third section displays the P\&L VS Current price and the final P\&L of each ***realized event*** (aka a SELL entry in the trade log), basically telling you how much money you made or loss on the trade.&#x20;
* The fourth section is for optional comments on your trade.&#x20;

## Trade Entry Section

The **first 7 columns** (the lighter ones) are where you enter your trades. This is self-explanatory, but let's go over the details.&#x20;

<figure><img src="https://1714922137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl25uds0OJbgRcq45kX3M%2Fuploads%2Fpy7BM13KCxt2ItnbeDnJ%2Fsmolcompute%202024-06-04%20at%2016.33.01.png?alt=media&#x26;token=69ad1c1c-3af7-4ef8-9df1-b04e796be476" alt="Trade Log&#x27;s Entries Section" width="563"><figcaption><p>Trade Log's Entries Section</p></figcaption></figure>

* **Date**: the date of the trade.  This column is pre-formatted to use a universal standard.

{% hint style="warning" %}
Please note that the date should be precise enough to allow for *<mark style="color:green;">**chronological sorting**</mark>* of your trades. In some cases, the ***time*** of the trade , in addition to its date, will be necessary (e.g., if you are both buying *and* selling the same asset **on the&#x20;*****same day***).&#x20;
{% endhint %}

{% hint style="info" %}
**Tip:**   A quick way to enter the *exact date and time* is via the application's menu.&#x20;

Go to Table > Insert Current Time (this will enter *both* the date and the time down to the second). &#x20;

Even quicker:  hit  **Control - Shift - Command - T**

If you are batch-importing your trades via the [smol Formatter](https://guides.smolcompute.xyz/1/formatter), the correctly formatted date and time will carry over.&#x20;
{% endhint %}

* **Account:** This is for optional metadata (E.g., Binance, Robinhood, 0xacB69, TFSA)
* **Side:** BUY or SELL (or FEES, see box below).&#x20;
* **Market:** The asset code (ticker) of the asset traded.
* **Quantity:** The number of units bought or sold.
* **Price:** The USD price the asset was traded at.
* **Fees:** Optionally, any fees incurred for that trade. The fees you enter here will be added to your **cost basis** for that specific asset and will be reflected in your final P\&L.

{% hint style="info" %}
In addition to "BUY" and "SELL", the **Side** column offers you a third option, **"FEES".**  The reason is that, in crypto, there are often network fees to pay even when we are not buying or selling. Each time we interact with the blockchain, we must pay a gas fee. These fees impact your final P\&L. *The FEES option allows you to log these fees and* *add them to the cost basis of the asset concerned in the blockchain interaction.&#x20;*&#x20;
{% endhint %}

<figure><img src="https://1714922137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl25uds0OJbgRcq45kX3M%2Fuploads%2FjogPnTHFgxtg4bUBHsCg%2Fspaces_zbhCX7v3MAd7EUfiqlWL_uploads_PTiZ37O7HbsiAyk7jdKM_Smol%20Traeeeecker%20(Website).webp?alt=media&#x26;token=fef0411f-9d59-491a-b2e3-46ee35d19d98" alt=""><figcaption><p>Network fees entered for the PENDLE token.</p></figcaption></figure>

## Stats Section

The **Stats** section maintains important values updated with each event, such as the updated total of units owned for the asset  as well as its updated cost basis. Many will find these columns informative and useful, but they can also be hidden if you don't have any use for this information. Do not delete them though.&#x20;

<figure><img src="https://1714922137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl25uds0OJbgRcq45kX3M%2Fuploads%2FLwW3oD3MPv4cUlBZdUZn%2Fsmolcompute%202024-06-04%20at%2016.30.50.png?alt=media&#x26;token=45398bfa-4dca-4eab-a9f0-d9beaba5fde4" alt="" width="375"><figcaption><p>Trade Log's Stats Section</p></figcaption></figure>

## P\&L Section

The third section of the Trade Log computes your **P\&L**<mark style="color:purple;">**.**</mark>&#x20;

The first column (**% P\&L VS Current Price**) tells you in % terms how much higher or lower the current price is vis a vis the price transacted at (for each row / transaction). If the row registers a SELL event, the calculation is inverted, so that if the currenrt price is higher than the price you sold at, you will see a negative % P\&L. &#x20;

The second column (**$ P\&L VS Current Price**) uses that percentage and multiplies it by the $amount transacted, letting you know in $ terms how much you may have gained or lost. N.B: *These columns are purely for informational use and do not affect in any way the calculation of your account's P\&L.*&#x20;

Each time you SELL an asset you own, the  third and fourth columns display your final realized P\&L both in % terms and in $ terms  (proceeds of units sold minus cost of units sold). These figures also takes into account any fees you may have entered for this asset, both in the Fees column (when entering a  BUY or SELL event), or via the FEES entry (see box above). &#x20;

If you [set a secondary currency](https://guides.smolcompute.xyz/1/tracker/secondary-currency)**,** your P\&L will also be displayed in that secondary currency in the fifth column,  taking the exchange rate in effect *on the date you have entered in column A.*&#x20;

<figure><img src="https://1714922137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl25uds0OJbgRcq45kX3M%2Fuploads%2FHoOiQiWl6W1DNbdf5guR%2Fsmolcompute%202024-06-04%20at%2016.28.52.png?alt=media&#x26;token=45421188-eca3-4cb2-9487-79fe38e53632" alt="" width="563"><figcaption><p>Trade Log's  P&#x26;L Section</p></figcaption></figure>

## Sorting the Trade Log

You can **sort your trades** by header columns.  The main utility of this is the ability to add trades to to the Trade Log and not have to worry about entering them in perfect chronological order. You can simply add trades to the bottom of the list and then sort the list by dat&#x65;**,** and everything will then get computed correctly.

*Note that the Trade Log computes trades from **top to bottom,*** so trades MUST be *sorted* chronologically to be correctly computed. For example, you obviously can't sell something you have not already bought. But even if you do not *enter* them chronologically, you can simply ***sort*** ***by date*** and everything will recompute accordingly so long as the dates you have entered are correct.&#x20;

A good use case might be if you are using more than one exchange to trade Bitcoin, but want still want all these trades computed as one (say, for tax purposes). You want to know your P\&L and cost basis for Bitcoin ***across all Exchanges,*** not just on one exchange. Simply enter all your trades in the Trade Log and then sort by date and your costs basis and P\&L will be correctly computed across all exchanges, wallets, etc. (Use the Smol Formatter if you want to bulk import trades).

<figure><img src="https://1714922137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl25uds0OJbgRcq45kX3M%2Fuploads%2FjpJsHvqoECrJyUFzHurW%2FCleanShot%202023-11-11%20at%2012.14.59%402x.png?alt=media&#x26;token=87a17124-3553-4293-9864-9fd1c033a440" alt=""><figcaption><p>Sorting your Trade Log by by date.</p></figcaption></figure>

h
