Its caravan profit thats key here as said. The number that dwarves look at to determine the success of your fort and whether they want to move is created wealth-imported wealth. Created wealth seems to be value of your fortress plus exported wealth, smoothing and engraving rooms in particular is an epic created wealth kick, building artifact furniture adds its value to the fort too (items in stockpiles are not fort worth, but if they are weapons held by a dwarf they seem to be, this is the origin of the displaycase mod so you can get artifact jewellery/toys/instruments etc into your wealth by building them).
Be aware that goblinite (anything dropped by hostiles) is all 'imported'. I once heard that trading out imported items, that is those denoted ingame inside a bracket, does not count towards exported wealth and therefore created wealth since you had no hand in its construction. I experimented a little by decorating all the goblinite which definately removes the imported tag but did not test in controlled conditions so cannot confirm that it then became exported wealth, or that it did not before, this should be regarded as anecdotal unless someone can confirm.
Immigrants do have other factors at play other than this raw number. Im not certain of all of them but number of dwarf deaths definatly can disuade them.
Note, created wealth that your dwarves are so influenced by is also the number that goblins and MBs are watching, you want one, you get the other too.
Lastly remember there is a delay on migrants whilke they travel. Ive had rollercoaster forts where my wealth climbs and falls rapidly (you do well, goblins come and trash the place). I tended to get huge migrant waves when my fort was in ruins and then tiny ones when it was successful. Not because they work that way, they dont, but because they were leaving the mountainhome when i was successful to find ashes, or leaving to come to a hellhole, only to arrive at a palace.