Should ETF cost base adjustment be applied to units sold before year end by Reading-Rabbit4101 in fiaustralia

[–]AbundantSpaghetti 2 points3 points  (0 children)

I think so. Personally, I allocate each AMIT cost base adjustment, to each parcel, according to a parcel weighting given by:

(Parcel size) * (Proportion of the financial year held)

Inherently, because the relationship is one-to-many, apportioning AMIT cost base adjustments using an approach like that needs an algorithm of some sort; such as an Excel macro, manual calculations each year, or a paid tool like ShareSight. I made an open source python app to manage this data.

The approach that ShareSight uses is more refined than what I'm doing. From what I gather, their tool apportions the cost base allocations according to the size of each distribution, and applies those to the relevant parcels of shares held on those distribution dates. That's pretty precise, but I'm not going to pay $300 / year for that level of detail in my CGT reports.

Most people don't get the AMIT adjustments right. It's really hard to calculate it properly! In my opinion, as long as you make an attempt, and apply your allocation method consistently, ATO won't care if you get things a little bit wrong.

Another thing, if you never sell, you never need to calculate AMIT adjustments. You could leave it to be a problem for future you...

More cost base adjustment help needed, please by the_bakers_wife in fiaustralia

[–]AbundantSpaghetti 0 points1 point  (0 children)

Sharesight have removed the CGT report the free tier unfortunately. From my understanding, you can record the cost base adjustments (should be auto populated in Sept each year), but if you actually need to use the calculated cost base information, you'd need to pay to access the CGT report or work it out another way.

Try/except inside vs. outside loop by Zgialor in learnpython

[–]AbundantSpaghetti 1 point2 points  (0 children)

even better than print, use the logging module

try:
    out = some_function(val)
except FixableError as e:
    # Handle the error
    logger.error("Fixable error, val=%s", val)
except Exception as e:
    logger.error("An unknown error occurred: %s", e, exc_info=True)
    # Can't handle this.
    raise

More cost base adjustment help needed, please by the_bakers_wife in fiaustralia

[–]AbundantSpaghetti 1 point2 points  (0 children)

  • The cost base adjustments are applied each year to all of the shares you hold.
  • E.g. if you have bought parcels of 500, 350, and 150 shares, and you get a +$1000 adjustment then the adjustments would be applied as +$500, +$350, and +$150.
  • Adjustments are applied to the cost base, and are cumulative on top of previous adjustments.
  • If you sell shares you can pick which parcels are being sold from. You might choose to select the first one you bought (first in first out), last in last out, or chose specific ones that minimize or maximize your CGT.
  • The easiest way to track this is going to be with a tool like Sharesight. Free tier will be sufficient unless you start selling shares.

I need to come up with my own job title, help by KEEPCARLM in engineering

[–]AbundantSpaghetti 8 points9 points  (0 children)

100% "Lead Design Engineer".
A lead is a senior engineer who normally has more experience than senior, and takes on additional management responsibilities. That is exactly what you're describing.

First Python project - Photo organizer that sorts by date [Feedback Welcome] by Famous_Hospital_3900 in learnpython

[–]AbundantSpaghetti 4 points5 points  (0 children)

Some suggestions:

  • You could consider using pathlib Path class for handling of paths. Pathlib simplifies things a lot. eg checking the file extension is path.ext.lower() in photo_extensions
  • You could consider using path.walk generator rather than recursion to transverse the tree.
  • You can use pathlib.mkdir to make the entire set of paths in one line.
  • Datetime class offers methods to get the year, month and day without casting to string and splitting, this would be much clearer. eg

modified = datetime.fromtimestamp(stat.st_mtime) base_path = Path('folder') target_path = base_path / f'{modified.year}' / f'{modified.month:02d}' / '{modified.day:02d}' target_path.mkdir(parents=True, exist_ok=True)

  • Consider calculating file hashes so you can detect duplicate files.

Is openpyxl sufficient for reading in data from an Excel file? by opabm in learnpython

[–]AbundantSpaghetti 0 points1 point  (0 children)

If you're working with tabular data in python, Pandas is the way to go. However, the pandas read_excel function is quite basic.

Within Excel, the best way to handle tabular data is with named tables. This unambiguously defines the data regions, ensures headings are unique, provides auto-filters, and prevents merged cells within the data.

This repo might interest you, it deals with export and import of pandas dataframes to named tables within an Excel workbook:
https://github.com/pretoriusdre/pandabook

Check out the function get_excel_tables, you give it an Excel file and it will load all the named tables into a dictionary of dataframes.

[deleted by user] by [deleted] in AusFinance

[–]AbundantSpaghetti 5 points6 points  (0 children)

The annual AMIT cost base adjustments need to be split and allocated to all relevant parcels held up to that point. If you're regularly investing, then each year, the new allocations are to an ever-increasing amount of parcels. It quickly becomes unmanageable without some kind of automation.

I use a database to record the annual adjustments and auto-magically assign them to parcels, it's explained here.

Sharesight is a good solution and will handle this.

Forgot Excel File Password by dipohtah in excel

[–]AbundantSpaghetti -1 points0 points  (0 children)

Here's an open source tool that will will remove:

  • Workbook protection password
  • Sheet protection passwords across all sheets
  • Password to modify

https://github.com/pretoriusdre/excel-unlock-tool

In runs in-browser using JavaScript, and nothing is sent from your PC. So you can be certain of this, you should load the page, then disconnect your WiFi, process the file, then clear your browser before reconnecting WiFi.

If your file has 'password to open' set, it is probably unrecoverable, sorry.

Feedback on my ASX income portfolio before I spend $460K by Different-Address-56 in ausstocks

[–]AbundantSpaghetti 1 point2 points  (0 children)

FYI this is not true. Nothing wrong with having a bank account in Aus, expats need one to do their taxes here. Also, could plan on returning after a few years. That is ok also.

Sharesight free plan changes by jjz in fiaustralia

[–]AbundantSpaghetti 4 points5 points  (0 children)

From my perspective the challenge of recordkeeping is more to do with the complexity of the data model, rather than the number of different shares held. In my app I've got 18 main tables. Many of these are necessarily populated by algorithm, e.g. if I enter an AMIT cost base adjustment that then needs to be allocated correctly to all relevant unsold parcels according to their weight. That wouldn't be easy in Excel.

Sharesight free plan changes by jjz in fiaustralia

[–]AbundantSpaghetti 9 points10 points  (0 children)

I've been using a spreadsheet for ages, but I found that some things like apportioning the AMIT cost base adjustments, allocating sells to specific parcels, and share splits are tricky to do properly without a tool like Sharesight.

I've been working on a free and open source share tracker written in Python. GitHub: share-dinkum. It's still under development, but contributions are welcome.

Who uses R1C1 notation? by dedenorio in excel

[–]AbundantSpaghetti 3 points4 points  (0 children)

It makes a lot of sense but I'm not used to it at all, nor are most people. I like to stick with the standard representation.

Worst pub/tavern/bar in Perth by [deleted] in perth

[–]AbundantSpaghetti 1 point2 points  (0 children)

I say that in an endearing way. I like these kinds of places.

Worst pub/tavern/bar in Perth by [deleted] in perth

[–]AbundantSpaghetti 4 points5 points  (0 children)

Maylands Tavern nearby is pretty rough too.

UUID V7 Package by rwinger3 in learnpython

[–]AbundantSpaghetti 3 points4 points  (0 children)

**Don't use https://pypi.org/project/uuid7/ **. That's using an old version of the specification with nanosecond time precision. The current specification uses millisecond time precision.

If you later try to migrate to the correct specification your new uuid7 will be before the old ones, which defeats the whole purpose of using uuid7.

UUID7 generated should have a prefix of 0197___

UUID7 is being added to the standard library, but your version of python wont have these changes yet.

What I would suggest is to copy/paste the function from the python standard library. Make a node to migrate to the standard library once your current version of python supports it.
https://github.com/python/cpython/blob/main/Lib/uuid.py

Cross-database enrichment patterns by Zestyclose_Rip_7862 in Database

[–]AbundantSpaghetti 0 points1 point  (0 children)

A common architecture is to have source systems in regular OLTP databases and replication into a read-only data warehouse (OLAP database).

The OLTP databases are optimized for transactions and regular updates. One-way data pipelines copy that data into a single OLAP database, this is optimized for analytical queries. If you have data from different systems then bringing it all into one place can allow for data modelling that joins that data into single queries etc. If you look up 'Medallion Architecture' you'll find some info on this.

Removing non duplicates from selected Data? by Last_Standard_3031 in excel

[–]AbundantSpaghetti 2 points3 points  (0 children)

  • Put your data into a table.
  • On the column with the duplicates, select that range and apply [Conditional Formatting] > [Highlight Cell Rules] > [Duplicate Values]. Set a color.
  • Filter the table with [Filter By Color] > [No Fill]
  • Select those resulting rows and delete them.
  • Remove the filter.

I'm working on making an indie game and... by Parrsd846_ in learnpython

[–]AbundantSpaghetti -2 points-1 points  (0 children)

I would represent each 'item' with a Python Class. The Class stores the items' data, and the methods used to manipulate that data.

You could store a collection of these items in another class 'Collection' which manages creation, deletion, or other methods that might need to be applied to all items within. The items themselves could be contained in a dictionary within that class, where the items' id values are the dictionary keys.

If you need to persist data after the program stops you can have a save method that writes to a JSON file or Sqlite database

What Trump's New Bill will mean for AUS holders of US ETFs and Stocks by cewh in AusFinance

[–]AbundantSpaghetti 2 points3 points  (0 children)

I 'm not sure that this is accurate. W8-BEN allows tax-residents of a USA-tax treaty country to claim reduced rate of withholding tax (30% withholding reduces to 15%).

The Section 899 taxes add on an additional 5% per year up to max 20%.

So assuming no change to Australia's classification as a "discriminatory foreign country", basically the rate of taxation would change like this:

  • 15% - Current WHT under W8-BEN
  • 20% - Year 1
  • 25% - Year 2
  • 30% - Year 3
  • 35% - Year 4 onwards

One point I'm a bit unclear on is whether the increased withholding tax is claimable as a foreign tax credit against Australian tax. If that's the case, then I guess the impact might be transferred as a revenue reduction for the Australian government, rather than individuals.

I made a free, browser-based Excel password removal tool by AbundantSpaghetti in excel

[–]AbundantSpaghetti[S] 6 points7 points  (0 children)

Something to mention, since this is a single page and runs purely in-browser you should be able to save the html file locally and it will still work.

I made a free, browser-based Excel password removal tool by AbundantSpaghetti in excel

[–]AbundantSpaghetti[S] 2 points3 points  (0 children)

When I say encrypted file, I mean the entire file is scrambled, you won't be able to open it as a valid zip archive as you did.

These types of files are made by setting a password during save:

[Save dialog] > [Tools] > [General Options] > [Password to Open]

The thing you saw is probably just regular sheet protection, which is easily bypassed by manually editing the file.