The alloying process plays a pivotal role in the development of advanced multifunctional plasmonic materials within the realm of modern nanotechnology. However, accurate in silico predictions are only available for metal clusters of just a few nanometers, while the support of modelling is required to navigate the broad landscape of components, structures and stoichiometry of plasmonic nanoalloys regardless of their size. Here we report on the accurate calculation and conceptual understanding of the optical properties of metastable alloys of both plasmonic (Au) and magnetic (Co) elements obtained through a tailored laser synthesis procedure. The model is based on the density functional theory calculation of the dielectric function with the Hubbard-corrected local density approximation, the correction for intrinsic size effects and use of classical electrodynamics. This approach is built to manage critical aspects in modelling of real samples, as spin polarization effects due to magnetic elements, short-range order variability, and size heterogeneity. The method provides accurate results also for other magnetic-plasmonic (Au-Fe) and typical plasmonic (Au-Ag) nanoalloys, thus being available for the investigation of several other nanomaterials waiting for assessment and exploitation in fundamental sectors such as quantum optics, magneto-optics, magneto-plasmonics, metamaterials, chiral catalysis and plasmon-enhanced catalysis.