Despite the trail of financial and political failure they left, we remember the Medici with dazzlement largely for two reasons. One is that they were very good at landing on their feet. The other is they were brilliant at spin.

Their bank, which opened in Florence in 1397, lasted less than 100 years. Its glory days were over even before Cosimo, its most capable head, died in 1464. As money ran out, Cosimo's successors, Piero the Gouty and Lorenzo the Magnificent, relied ever more on manipulating Florence's superficially republican constitution to hold on to princely influence and power. When enemies united to banish the Medici in 1494, their bank was already dead in the water, victim of mismanagement and a wider banking downturn.

The Medici soon slipped back into Florence as puppets of the Habsburg dynasty. They employed artists, notably Vasari, to present the Medici as Florence's natural rulers and its art as Italy's best. The Medici now put their wealth into land, which they did little to improve, and married their daughters into the sovereign houses of Europe. They ruled without glory and often oppressively until the line died out in 1737. Reform-minded Austrians then arrived as Tuscany's new rulers to drag the duchy into the modern world.

From this melancholy record, a golden legend was spun: over Renaissance Florence presided a uniquely talented family of wealthy and art-loving patrons who politicked, banked and talked Plato with equal aplomb. An early exponent of this beguiling myth was William Roscoe, a radical Liverpool banker and anti-slave trade campaigner, born in 1753. He never actually visited Florence, but his Life of Lorenzo de' Medici credited the family, as if alone, for conjuring up the city's beauties and for restoring "science and true taste" after the era of Petrarch and Dante.

As with most legends, Roscoe's had elements of truth. Cosimo paid for San Lorenzo, the Medici church in Florence, and for the renovated monastery of San Marco. He built the largest private palace yet seen in the city. Lorenzo had no cash left for public grands projets but he wrote verse, built the Villa Medici at Poggio a Caiano and paid for a house where the humanist Marsilio Ficino could Latinise Plato.

It is tempting to tell the story of the early Medici by puncturing the legend. But to do that convincingly, you need to trace the history of the myth, and that means telling two stories in one. It also risks fostering a counterpart Medici legend of unremitting villainy or incompetence. Tim Parks simplifies things by focusing on the 15th century. The story is quite fascinating and intricate enough on its own. Parks is probably best known as a novelist. But he is also a translator of Moravia, Calvino, Tabucchi and Calasso. He lives in Italy and has interpreted its life and politics to English-speaking readers for more than 20 years. He knows and loves the place well enough not to spare the locals. His Italian Neighbours (1992) is a wry account of daily life in a small town near Verona, told with insider knowledge and outsider shrewdness.

Despite the image of cultivated ease that has so appealed to harried modern readers, the 15th-century Medici seldom enjoyed security. Nothing was stable, Machiavelli wrote in his history of Florence, and Parks takes instability as an organising theme. Even Cosimo's clever arrangements had "a precarious feel".

Banking was in its infancy. Double-entry book-keeping, which some banking historians wrongly credit to the Medici, was a novelty. Nobody knew well how to reckon risk. The Medici's Rome branch relied on rough loan rules: no more than 300 florins to cardinals and none to Roman merchants (unreliable), feudal lords (a law unto themselves) or Germans (their courts would not recognise non-German creditors).

To bankers, the church represented an opportunity and an obstacle. Church business was lucrative. To the papacy flowed vast sums in ecclesiastical taxes. Lest these sit idle, it needed bankers to recirculate them at profit. The Medici obliged. Indeed, Rome was their golden goose. In the bank's only real period of success up to mid-century, more than 50% of the Medici bank's profit came from papal business. On the other hand, the church disapproved of usury - lending at interest. Rigorists rejected interest outright. Other theologians judged it moral as long as rates were not fixed and payment could be plausibly treated as an optional gift to the lender. A common 15th-century Italian term for interest was "discrezione". Interest, in other words, had to be thought of like a tip in a restaurant: everyone knew it was a semi-fixed extra payment but appearances were maintained. In practice, banks used bills of exchange, which worked like loans but were more cumbersome.

The Medici ran their banks through general managers. Cosimo, who had a nose for people, appointed Giovanni Benci. To discourage the family from treating the branches as their private piggybanks, Benci persuaded Cosimo to create a Medici holding company that took shares in otherwise independent branches. This rational arrangement did not long survive Benci's death in 1455.

Though better at politics, Lorenzo had no feel for money. (Unlike his grandfather Cosimo, Parks notes intriguingly, he had no sense of smell.) As the bank faltered, the Medici continued to raid it for "munificence" - bribes, charity and other fallow expenditures. Lorenzo married into the old Roman aristocracy. His son became pope. The pursuit of profit had become a search for status and power.

Politically, 15th-century Florence was an unstable mixture, unlike Venice, which had institutionalised an oligarchy, or Milan, a more or less open tyranny. Medici rule faced continual assaults from competing oligarchs or from popular discontent. The Pazzi conspirators of 1478, egged on by a hostile pope, just failed to kill Lorenzo. The factional detail sometimes threatens to drown Parks's otherwise lively narrative. But his overall message is sparklingly clear: whatever else you have heard about the Medici, politics, art and banking did not really mix.