How to send email to IRS and US treasury to complain about the 10% PTPs tax?

How to file the US tax return, what is the form to fill {for foreigners} ?

Form 1040-NR.

Before you can file a tax return, you'll need to obtain a tax ID number, by filing Form W-7.

To file Form W-7, you either need to enclose original identification documents, which are then returned to you, or you need to file the form through a Certifying Acceptance Agent that has the authority to review your identification documents in a face-to-face meeting.

These forms are used by individuals. If you have a foreign business entity, e.g., a corporation, partnership, or trust, that is a completely different conversation, and it gets really complicated really fast. These forms cannot be used by a business entity.

Also: the term tax return refers to the form that you file with the Internal Revenue Service, and that is what the form is called, regardless of whether you get a refund. A refund is not a return, and a return is not a refund. Even if you owe tax to the US government, the form that you file is still called a tax return. This is a common misunderstanding even among US citizens.
 

Attachments

Form 1040-NR.

Before you can file a tax return, you'll need to obtain a tax ID number, by filing Form W-7.

To file Form W-7, you either need to enclose original identification documents, which are then returned to you, or you need to file the form through a Certifying Acceptance Agent that has the authority to review your identification documents in a face-to-face meeting.

These forms are used by individuals. If you have a foreign business entity, e.g., a corporation, partnership, or trust, that is a completely different conversation, and it gets really complicated really fast. These forms cannot be used by a business entity.

Also: the term tax return refers to the form that you file with the Internal Revenue Service, and that is what the form is called, regardless of whether you get a refund. A refund is not a return, and a return is not a refund. Even if you owe tax to the US government, the form that you file is still called a tax return. This is a common misunderstanding even among US citizens.

You’ve stated your professional history before… you are literally the only person on here who can give tax advice without just making stuff up.
 
Bringing selenium and python into the picture for this might be overkill. It can be done in a line or two of bash instead:
Code:
xmllint --html --shell <(curl -s 'https://ibkr.info/node/4706') <<< \
   'cat //table[last()]/tbody/tr/td[1]/text()' | fgrep -ve ISIN -e ---- -e/

Since I'm with python and selenium for web queries (because most stuff is dynamic), that's almost what I use myself. But yes, on Linux your solution is simpler.
 
Since I'm with python and selenium for web queries (because most stuff is dynamic), that's almost what I use myself. But yes, on Linux your solution is simpler.

Yeah... I'm also a fan of both python and selenium.

But, with due respect, what ticked me off about the code you posted was that it didn't "stand alone". That is, a user couldn't just copy and paste it and have it work without going to some significant extra effort.

Of course this could be said about any snippet of code posted in a forum, but there's varying degrees.

Nonetheless, your sample got the point across. Many thanks for that. I just thought I'd try and take it a little further in case someone in the future was interested in an simpler alternative.
 
  • Like
Reactions: d08
Yeah, I see that now, a few tweaks needed.

As much as I like Python, that seems to be par on its course. The package installer for Python (pip) addresses this to some degree but there's no cure-all... c'est la vie. Don't even get me started about the transition from Python2 to Python3.
 
It's an insane piece of regulation, you're taxed on PROCEEDS, not profits. So immediate buy and sell registers a 10% loss.

For now, the list of unqualified PTPs can be obtained from IB:

Code:
from selenium import webdriver

def get_ptp_list(self) -> list[str]:
    """ Withholding on Publicly Traded Partnerships (“PTPs”) Effective Jan 2023 """
    print(f"Building list of Publicly Traded Partnerships (PTPs) from IBKR...")
    symbols = []
    try:
        with webdriver.Chrome() as driver:
            driver.get("https://ibkr.info/node/4706")
            table_header = driver.find_element(By.NAME, "without_qualified_notice")
            table = table_header.find_element(By.XPATH,"./following::table[1]")
            rows = table.find_elements(By.TAG_NAME, 'tr')
            for row in rows[1:]:
                cells = row.find_elements(By.TAG_NAME, 'td')
                symbol = cells[1].text
                if symbol:
                    if symbol != "-":
                        symbols.append(symbol)
        print(f"Publicly Traded Partnerships (PTPs) list built successfully.")
    except:
        print(f"Failed to obtain PTP symbols.")
    return symbols
Bringing selenium and python into the picture for this might be overkill. It can be done in a line or two of bash instead:
Code:
xmllint --html --shell <(curl -s 'https://ibkr.info/node/4706') <<< \
   'cat //table[last()]/tbody/tr/td[1]/text()' | fgrep -ve ISIN -e ---- -e/
I have zero knowledge in programing*, can you simplify to me how and where to use this codes?

*The only language I use is thinkscript which I think is not considered a programing language
 
I have zero knowledge in programing*, can you simplify to me how and where to use this codes?

*The only language I use is thinkscript which I think is not considered a programing language

The only reason you'd use those codes is if you wanted to highly automate your processing. For example, if you traded hundreds of transactions and/or wanted to write software that helped prepare your taxes year after year or for multiple accounts.

So, if you have "zero knowledge of programming" there's no point in explaining further details. As a beginner you can just copy and paste the list from the web-site into a spreadsheet and work from there. There's no point in putting the cart before the horse.
 
The only reason you'd use those codes is if you wanted to highly automate your processing. For example, if you traded hundreds of transactions and/or wanted to write software that helped prepare your taxes year after year or for multiple accounts.

So, if you have "zero knowledge of programming" there's no point in explaining further details. As a beginner you can just copy and paste the list from the web-site into a spreadsheet and work from there. There's no point in putting the cart before the horse.
Are this codes related to the Interactive Brokers API ? if yes, I trade with td ameritrade which has an API but it is not as comprehensive as IB, does it work with them too? (I'm also a beginner with API)
 
Are this codes related to the Interactive Brokers API ? if yes, I trade with td ameritrade which has an API but it is not as comprehensive as IB, does it work with them too? (I'm also a beginner with API)

No, the code @d08 and I posted has nothing to do with the IB or TD APIs. It operates more broadly on web APIs and the technique can work with any web-based data.

This is known as web scraping and, honestly, I only suggest web scraping as a last resort. It's not a "data API" meant for analysis in any conventional sense and can be ephemeral.

Web scraping is like unrequited love... only one party is aware of the relationship. Because of this there's a much higher chance that one day the layout will change or the data will disappear altogether. So, it can end up being more trouble than it's worth. Sometimes it does actually work out well but more often than not it ends in disappointment.

Of course, if you get good at it and the data isn't available anywhere else or at a reasonable price, then yeah... scrape away. Just beware it's a double-edged sword.
 
Back
Top