I have many data sets in the format such as this one, however most are much longer.
origin is just the country name and year represents the year of an agreement.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str9 origin float year
"Australia" 1980
"England"   2000
"USA"       2020
end
This was the code used to generate the results in the format I need them in for analysis, which is fine for this example but for the much larger data sets is there anyway I can use a loop to replace the 0's in the dummies with 1 when the var is a country name and the year is greater or equal to the year of an agreement for that country.

clonevar destination = origin
order origin destination year
fillin year destination origin

gen origin_dummy = 0
gen destination_dummy = 0

replace origin_dummy = 1 if origin == "Australia" & year >= 1980
replace origin_dummy = 1 if origin == "England" & year >= 2000
replace origin_dummy = 1 if origin == "USA" & year >= 2020

replace destination_dummy = 1 if destination == "Australia" & year >= 1980
replace destination_dummy = 1 if destination == "England" & year >= 2000
replace destination_dummy = 1 if destination == "USA" & year >= 2020

drop _fillin

This is the result i'm after for reference

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str9(origin destination) float(year origin_dummy destination_dummy)
"Australia" "Australia" 1980 1 1
"England"   "Australia" 1980 0 1
"USA"       "Australia" 1980 0 1
"Australia" "England"   1980 1 0
"England"   "England"   1980 0 0
"USA"       "England"   1980 0 0
"Australia" "USA"       1980 1 0
"England"   "USA"       1980 0 0
"USA"       "USA"       1980 0 0
"Australia" "Australia" 2000 1 1
"England"   "Australia" 2000 1 1
"USA"       "Australia" 2000 0 1
"Australia" "England"   2000 1 1
"England"   "England"   2000 1 1
"USA"       "England"   2000 0 1
"Australia" "USA"       2000 1 0
"England"   "USA"       2000 1 0
"USA"       "USA"       2000 0 0
"Australia" "Australia" 2020 1 1
"England"   "Australia" 2020 1 1
"USA"       "Australia" 2020 1 1
"Australia" "England"   2020 1 1
"England"   "England"   2020 1 1
"USA"       "England"   2020 1 1
"Australia" "USA"       2020 1 1
"England"   "USA"       2020 1 1
"USA"       "USA"       2020 1 1
end