Both of my GSDs are off leash trained to stay on my property, and I live in a subdivision with LOTS of kids and dogs. What I did when they were puppies, as early as 10 weeks was to take them on leash along the entire boundary of our property. I repeated "Home, good Home" over and over. Then, I used a clicker with treats. The process, on leash was, take the dog right to the property line with a treat in my pocket and just stand there. When the pup took a step toward me I clicked and treated. I repeated this over and over in the same spot until the pup readily took that one step to me. Then, I moved the pup to various locations around the property line, slowly so that at each spot, the pup understood stepping to the inside of the yard got him a treat. I also continued my parade on leash around the property repeating "good Home." When the pup understood to get a treat anywhere on the property line he had to step into the yard, I then assigned the cue "home." Because the pup was familiar with the word, it quickly learned that inside the property was "Home" and that he (later she) was the best dog in the world for staying "Home." Finally, I attached a long piece of yarn to the collar (light enough so that the pup did not think there was a leash attached) and went out in the yard waiting for the pup to cross the property line. When he got within about 6 inches, I would command Home! If he stayed in the property, he got a Jackpot treat. If he did not, he got a "Aw try again" and I could control him by simply grabbing the yarn. Two failures in a row and we went back in the house. I did not scold, act mad, or frustrated. I just took away what he wanted. Ten minutes later, we would try again. He quickly learned that staying in the yard meant he could stay out with me. Finally, the biggest tests -- I arranged for several of my neighbors (God bless them) to walk by with kids screaming, bouncing balls, dogs, you name it. The same process was used. If the pup stayed in the yard, Jackpot treat AND people would come onto the property to tell him how great he was. If he broke the property line twice, in the house for ten minutes. Both my dogs quickly learned that great things happen if they just stay in the yard, including meeting all those exciting people and dogs! Hope this helps and good luck!
Sable (plush GSD)