Question: I was wondering if there are any ledgers to make such entries. I trade regularly and I would like to make a good record of it.

Answer: 
Have a look at the Asset functionality of common accounting packages. It allows you to record prices and quantities of 'things' at purchase and sale. For shares, each stock code can be considered a separate 'thing' with buy and sell prices and quantities held in 'inventory'.

Each accounting package has its own processes and it takes awhile to become familiar with them. Here are some steps to get you started with gnucash, which is "[personal and small-business financial-accounting software, freely licensed under the GNU GPL](https://www.gnucash.org/)". (Disclaimer: I've starting using the software fairly recently, but I'm not otherwise knowingly affiliated with gnucash.)

1. Download and install [gnucash](https://www.gnucash.org/docs/v3/C/gnucash-guide/invest-setup1.html).
2. Open gnucash and Select menu item File -> New File. If a dialog pops up asking you to save changes to the (default) file, select "Continue Without Saving". This brings up the New Account Hierarchy Setup dialog.
3. Fill in whatever you like until you reach "Choose accounts to create". Here, select "Investment Accounts" for some defaults to start you off. Carry on with the rest of the dialog.
4. You'll be asked to save the file. Pick a filename you like, such as "Shares 2018". Pick a location (directory or folder), but be aware that gnucash will save lots of temporary and backup files in the same location. The filename you pick will be the main file, and once you quit gnucash, the rest can usually be safely deleted. However, you might want to keep them as backups. Make sure you click "Save" often (see the menu ribbon below the "File" menu) to ensure that your main gnucash file is up to date.
5. After saving, you'll see the chart of accounts. Here's a [link](https://www.gnucash.org/docs/v3/C/gnucash-guide/chapter_invest.html) to the gnucash manual for the chapter called "Investments". Follow [the instructions](https://www.gnucash.org/docs/v3/C/gnucash-guide/invest-setup1.html) to set up your investment portfolio, then use the manual for further instructions about buying and selling shares, recording dividends, and so on.

Have fun!
It's fairly easy to set up a spreadsheet that records trades and reconciles the gains and losses. It becomes more time consuming if you trade frequently and scale in and out of positions. And it gets onerous if your trading involves numerous wash sales. 

AFAIK, US brokers provide Forms 1099-B and 8949 that break down of all of this. The few that I've dealt with provide a disclaimer to the effect of: 

> 
> This is important tax information and is being furnished to the Internal Revenue Service. This statement has been prepared in accordance with our records, is provided for information purposes only and is not intended to constitute tax advice which may be relied upon to avoid penalties under any federal, state, local or other tax statutes or regulations, and does not resolve any tax issues in your favor. Please review it carefully for errors. It may or may not represent the amount of gain or loss reportable by you for Federal and state income tax purposes. We recommend that you consult your tax adviser as to the correct reporting of these items on your income tax return. 
> 
> 
> 

So the gist of it is that your broker prepares these forms, reports the results to the IRS yet disavows accuracy. I can attest that if you're a frequent flier, broker reporting often contain errors. Some of the more well known software offering differing levels of expertise are Gainskeeper, Quicken, and Tradelog.